guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unified name properties


From: Marius Vollmer
Subject: Re: Unified name properties
Date: 25 Sep 2000 22:51:05 +0200
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Dirk Herrmann <address@hidden> writes:

> Hmmm.  I don't see why this should be true, or, in other words:  I still
> can't see a use for names except for debugging purposes.  Maybe you have
> certain uses of 'name in mind, where it was important that there was just
> one single name?  (If several names were allowed, it would probably be
> better to use `names' instead of `name' to obtain these.)

I think you are beginning talking about a cross-reference tool here.
Such a tool is a great thing, but I don't think we should put that
burdon on a simple 'name property.  I really think that for most uses,
being able to identify a primary name is useful.  For example, when
printing on object via `write', you probably don't want to print all
the different ways you can get areference to it.  CAR should just
print as

    #<primitive-procedure car>

The "car" string would come from its name property.

[ Or maybe it should print as

    #<primitive-procedure r5rs:car>

  indicating its `home' module. ]

> > I would argue that only this form
> > 
> >     (define (foo) ...)
> > 
> > should give a name to the created function, while this
> > 
> >     (define foo (lambda () ...))
> > 
> > should not.
> 
> Why?  This is a different issue than giving several names to the same
> object as above:  In both cases a _new_ object is created, namely a new
> function.  Thus, you are not renaming anything.

Yes, but in the second case, we could assume that the user wanted to
define a variable which happens to get as its initial value a function
(and probably later assumes different values), while in the second
case, he wanted to create a new function with a specific name.

In Scheme, there isn't really any fundamental difference between the
two cases, but that's how I would interpret the intentions of the
coder.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]