[racket] something like a prop:object-name?
I've written 75% of a patch for this, so hopefully we'll have it soon.
Sam
On Wed, Apr 30, 2014 at 4:50 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> I think `prop:object-name` would be a good addition, but it doesn't
> exist right now.
>
> At Wed, 30 Apr 2014 16:35:06 -0400, "Alexander D. Knauth" wrote:
>> 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
>>
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users