On Fri, 29 Feb 2008 01:31:38 +0100 Tobia Conforto <[EMAIL PROTECTED]> wrote:

> Graham Fawcett wrote:
> > There does seem to be a good case for an immediate value that *can*
> > be tested this way, though. John et. al. wouldn't have used (void)
> > in eggs if there weren't.
> 
> What about providing a utility to create new immediate values,
> disjoint from anything else?
> 
> The immediate value space is far from cramped, if I'm not mistaken.
> Such a new-immediate-value function (which could benefit from a better
> name) would return a new value every time it's called, using for
> example an internal counter.  One could write:
> 
> (define sql-null (new-immediate-value))
> 
> (define (sql-null? x) (eq? x sql-null))
> 
> With the certainty that sql-null won't be eq? to anything else at all,
> won't be a list, a record, nothing at all except itself.

Wouldn't define-record do the trick?

Best wishes,
Mario


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to