[racket] something like a prop:object-name?

From: Alexander D. Knauth (alexander at knauth.org)
Date: Wed Apr 30 16:35:06 EDT 2014

What do you mean?  I tried it and it didn’t affect the object-name.  

And what I’m looking for is something that could be different for different instances of the same structure type, for example:
(struct thing (name) #:property prop:object-name (struct-field-index name))

(struct proc-with-string (proc str)
  #:property prop:procedure (struct-field-index proc)
  #:property prop:object-name (lambda (this)
                                (object-name (proc-with-string-proc this)))
  #:property prop:custom-write (lambda (this out mode)
                                 (display (proc-with-string-str this) out)))

On Apr 30, 2014, at 9:26 AM, Stephen Chang <stchang at ccs.neu.edu> wrote:

> Does the #:extra-constructor-name keyword argument to struct do what you're looking for?
> On Apr 29, 2014 9:31 PM, "Alexander D. Knauth" <alexander at knauth.org> wrote:
> I’m just curious is there something like a prop:object-name that the object-name function would use when returning the object name of a struct with that property?
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140430/6b61df65/attachment.html>

Posted on the users mailing list.