guile-devel
[Top][All Lists]
Advanced

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

Re: Unified name properties


From: Keisuke Nishida
Subject: Re: Unified name properties
Date: 20 Sep 2000 05:08:19 -0400
User-agent: T-gnus/6.14.4 (based on Gnus v5.8.6) (revision 02) SEMI/1.13.7 (Awazu) Chao/1.14.0 (Momoyama) Emacs/20.7 (i686-pc-linux-gnu) MULE/4.1 (AOI)

Keisuke Nishida <address@hidden> writes:

> 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



reply via email to

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