<div dir="ltr">Well, "relatively soon" turned out over-optimistic, but this is now merged.<br><br>Sam</div><br><div class="gmail_quote">On Mon, Jul 14, 2014 at 11:09 AM Sam Tobin-Hochstadt <<a href="mailto:samth@cs.indiana.edu">samth@cs.indiana.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've now generalized this to be a function or a slot in the struct.<br>
<br>
I hope to get it merged relatively soon.<br>
<br>
Sam<br>
<br>
<br>
<br>
On Sat, Jul 12, 2014 at 3:00 PM, J. Ian Johnson <<a href="mailto:ianj@ccs.neu.edu" target="_blank">ianj@ccs.neu.edu</a>> wrote:<br>
> Why is it a name per type? That seems wrong, since a function with docstring struct should have the object-name of the function, or something refined. The struct itself could be used for potentially every function a user writes, rendering object-name overly vague.<br>
> -Ian<br>
> ----- Original Message -----<br>
> From: "Sam Tobin-Hochstadt" <<a href="mailto:samth@cs.indiana.edu" target="_blank">samth@cs.indiana.edu</a>><br>
> To: "Matthew Flatt" <<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>><br>
> Cc: "Racket Users" <<a href="mailto:users@racket-lang.org" target="_blank">users@racket-lang.org</a>><br>
> Sent: Saturday, July 12, 2014 2:44:09 PM GMT -05:00 US/Canada Eastern<br>
> Subject: Re: [racket] something like a prop:object-name?<br>
><br>
> This doesn't count as "soon", but I finally cleaned up my patch for<br>
> this: <a href="https://github.com/plt/racket/pull/729" target="_blank">https://github.com/plt/racket/<u></u>pull/729</a><br>
><br>
> It's not as general as what Alexander envisioned, so it should<br>
> probably be generalized.<br>
><br>
> Sam<br>
><br>
> On Wed, Apr 30, 2014 at 5:13 PM, Sam Tobin-Hochstadt<br>
> <<a href="mailto:samth@cs.indiana.edu" target="_blank">samth@cs.indiana.edu</a>> wrote:<br>
>> I've written 75% of a patch for this, so hopefully we'll have it soon.<br>
>><br>
>> Sam<br>
>><br>
>> On Wed, Apr 30, 2014 at 4:50 PM, Matthew Flatt <<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>> wrote:<br>
>>> I think `prop:object-name` would be a good addition, but it doesn't<br>
>>> exist right now.<br>
>>><br>
>>> At Wed, 30 Apr 2014 16:35:06 -0400, "Alexander D. Knauth" wrote:<br>
>>>> What do you mean? I tried it and it didn’t affect the object-name.<br>
>>>><br>
>>>> And what I’m looking for is something that could be different for different<br>
>>>> instances of the same structure type, for example:<br>
>>>> (struct thing (name) #:property prop:object-name (struct-field-index name))<br>
>>>><br>
>>>> (struct proc-with-string (proc str)<br>
>>>> #:property prop:procedure (struct-field-index proc)<br>
>>>> #:property prop:object-name (lambda (this)<br>
>>>> (object-name (proc-with-string-proc this)))<br>
>>>> #:property prop:custom-write (lambda (this out mode)<br>
>>>> (display (proc-with-string-str this) out)))<br>
>>>><br>
>>>><br>
>>>> On Apr 30, 2014, at 9:26 AM, Stephen Chang <<a href="mailto:stchang@ccs.neu.edu" target="_blank">stchang@ccs.neu.edu</a>> wrote:<br>
>>>><br>
>>>> > Does the #:extra-constructor-name keyword argument to struct do what you're<br>
>>>> looking for?<br>
>>>> ><br>
>>>> > On Apr 29, 2014 9:31 PM, "Alexander D. Knauth" <<a href="mailto:alexander@knauth.org" target="_blank">alexander@knauth.org</a>> wrote:<br>
>>>> > I’m just curious is there something like a prop:object-name that the<br>
>>>> object-name function would use when returning the object name of a struct with<br>
>>>> that property?<br>
>>>> ><br>
>>>> ><br>
>>>> > ____________________<br>
>>>> > Racket Users list:<br>
>>>> > <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
>>>><br>
>>>> ____________________<br>
>>>> Racket Users list:<br>
>>>> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
>>><br>
>>> ____________________<br>
>>> Racket Users list:<br>
>>> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
><br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
</blockquote></div>