[racket] Run-time record access

From: Benjamin Greenman (blg59 at cornell.edu)
Date: Wed Dec 10 04:36:50 EST 2014

I'm hoping to implement the following function to access arbitrary struct
fields.

;; Compute `[st]-field-name st`, where
;; [st] is the name of the struct type of `st`
(define (runtime-get st field-name)
  (-> struct? string? any/c)
  (error "not implemented"))

Is this possible? I fear I can't use a macro because I don't know exactly
which struct I'll get at runtime.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141210/f916d931/attachment-0001.html>

Posted on the users mailing list.