This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: another nit.


On 6 Jul 2000, Harvey J. Stein wrote:

> If, on the other hand, the inability to use #f as a value is a
> shortcoming you want to overcome, you can make up a special value
> that can be in the list to denote undefined:
> 
> (define *my-undefined* (cons (gensym) (gensym)))

Another approach that can be used on the C level is to define a special
smob with exactly one value, namely *my-undefined*.  This is even safe
with regards to type tests as
  (pair? (get-property foo))
although it has the disadvantage of wasting one smob type.  Maybe the use
of goops would help to avoid this disadvantage, but I think you get the
idea.

Best regards
Dirk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]