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

From: Sam Tobin-Hochstadt (samth at cs.indiana.edu)
Date: Wed Mar 18 09:59:20 EDT 2015

Well, "relatively soon" turned out over-optimistic, but this is now merged.

Sam

On Mon, Jul 14, 2014 at 11:09 AM Sam Tobin-Hochstadt <samth at cs.indiana.edu>
wrote:

> I've now generalized this to be a function or a slot in the struct.
>
> I hope to get it merged relatively soon.
>
> Sam
>
>
>
> On Sat, Jul 12, 2014 at 3:00 PM, J. Ian Johnson <ianj at ccs.neu.edu> wrote:
> > 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.
> > -Ian
> > ----- Original Message -----
> > From: "Sam Tobin-Hochstadt" <samth at cs.indiana.edu>
> > To: "Matthew Flatt" <mflatt at cs.utah.edu>
> > Cc: "Racket Users" <users at racket-lang.org>
> > Sent: Saturday, July 12, 2014 2:44:09 PM GMT -05:00 US/Canada Eastern
> > Subject: Re: [racket] something like a prop:object-name?
> >
> > This doesn't count as "soon", but I finally cleaned up my patch for
> > this: https://github.com/plt/racket/pull/729
> >
> > It's not as general as what Alexander envisioned, so it should
> > probably be generalized.
> >
> > Sam
> >
> > On Wed, Apr 30, 2014 at 5:13 PM, Sam Tobin-Hochstadt
> > <samth at cs.indiana.edu> wrote:
> >> 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
> >
> > ____________________
> >   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/20150318/4de63156/attachment.html>

Posted on the users mailing list.