[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, 20 Sep 2000 12:30:03 +0200 (MEST) |
On 20 Sep 2000, Keisuke Nishida wrote:
> > How about unifying these procedures by a single procedure `name',
> > using the new property scheme?
> >
> > (define name (make-object-property))
> >
> > (name assq) => assq
> > (name <class>) => <class>
>
> Of course it must be defined in C so that one can initialize the
> names of objects properly. I'm not sure whether it ought to be
> mutable or not. A "write-once" property might be useful..
>
> (define name (make-read-only-property))
>
> (name obj) => #f ;; or undefined error
> (set! (name obj) 'foo)
> (name obj) => foo
> (set! (name obj) 'bar) ;; immutable error
Why shouldn't an object have several names? If you do (define foo car),
then you might want to get '(foo car) when you ask for the name of the
corresponding function object.
In any case, I think that giving names to objects is something that should
only be done automatically during debugging. Admitted, I almost always
run guile in debug mode, and I guess most people do, but if I don't, then
I have my reasons to do so and I'd like guile to be as slink and fast as
possible.
The `name' support could be in a module, which is always loaded when guile
is in debug mode, and which may be optionally loaded by those who want it
even when not running in debug mode.
Best regards
Dirk
- Unified name properties, Keisuke Nishida, 2000/09/20
- Re: Unified name properties, Keisuke Nishida, 2000/09/20
- Re: Unified name properties,
Dirk Herrmann <=
- Re: Unified name properties, Keisuke Nishida, 2000/09/20
- Re: Unified name properties, Marius Vollmer, 2000/09/20
- Re: Unified name properties, Dirk Herrmann, 2000/09/21
- Re: Unified name properties, Keisuke Nishida, 2000/09/21
- Re: Unified name properties, Dirk Herrmann, 2000/09/22
- Re: Unified name properties, Marius Vollmer, 2000/09/25
- Re: Unified name properties, Dirk Herrmann, 2000/09/26
- Re: Unified name properties, Jim Blandy, 2000/09/28
Re: Unified name properties, Marius Vollmer, 2000/09/20
Re: Unified name properties, Marius Vollmer, 2000/09/20