[Top][All Lists]

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

Re: Unified name properties

From: Dirk Herrmann
Subject: Re: Unified name properties
Date: Wed, 11 Oct 2000 09:51:58 +0200 (MEST)

On 11 Oct 2000, Marius Vollmer wrote:

> > My suggestion is, that we allow for multiple names returned in a list, but
> > that we also guarantee that the first name listed is somewhat 'basic'.  
> Hmm, I agree that we should plan for the possibility of finding all
> the names of an object, but I would expect that the primary or basic
> name of an object is quite cheap to keep track of, while finding all
> names is signifacantly more expensive.  When we only have a way to
> return all names, we allways need to find them all, even when the user
> is only going to use the first one in the list.

Yes.  But for which kind of application is this a problem?  Anyway, we
could provide a means to find the primary name of an object.  I just
wanted to point out that we should first be sure about what concept we
actually have in mind when defining an API for object names.  For example,
if the idea of 'one primary name and potentially many other names per
object' was used, we might want to express this by providing the function
(primary-object-name obj) instead of just providing (object-name obj).

In any case, I'd like to avoid that such a name property later inhibits
useful changes to guile because it puts restrictions on how guile's
internals have to be implemented.  Maybe it is a good idea to have certain
parts of the API marked as 'for debugging purposes only', such that people
are free to use it, but that we don't guarantee to keep such things
downward compatible.

Anyway, as we have seen, automatically determining a name for an object is
not a simple task:

  (define foo
    (let* ((state))
      (lambda ()
        <do something with state>)))

must be handled as well as:

  (define foo
    (if <some boolean> car cdr))

In this case _not_ giving a new primary name to car or cdr.  Another

(define foo
  <some new object>)

(set! foo
  (let* ((old-foo foo))
    (lambda ()
      (display old-foo))))

Determining a primary name in all these cases is difficult, I think.  And,
I don't want people to change their coding style just to comply with how
primary names are derived from the code.  If something like that would
happen, it would a very bad thing IMO.

Best regards

reply via email to

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