chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] New immediate values (was: DBI)


From: Tobia Conforto
Subject: Re: [Chicken-users] New immediate values (was: DBI)
Date: Fri, 29 Feb 2008 13:41:12 +0100

felix winkelmann wrote:
(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. I think this could have a few uses.

It would probably have uses, but what would you gain? All you need is a distinct unique object:

(define sql-null (gensym 'sql-null))


This is still a symbol.

People are using (void) because it's nothing but (void), that is, all standard predicates (symbol?, pair?, number?, string?...) return #f. Only its own predicate returns #t.


Tobia




reply via email to

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