chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] DBI


From: Peter Bex
Subject: Re: [Chicken-users] DBI
Date: Wed, 27 Feb 2008 22:31:15 +0100
User-agent: Mutt/1.4.2.3i

On Wed, Feb 27, 2008 at 04:23:37PM -0500, Graham Fawcett wrote:
> >  Can you even check for void?  Afaik there's no VOID? procedure.
> 
> You can; just compare with another (void) value:
> 
> (define void? (cute eq? (void) <>))

That sounds rather brittle.  Afaik "void" is defined as "no value".

One possible and plausible implementation of VOID is this:

(define (void) (values))

(eq? (values) (values)) is #t, but I'm not sure how safe it is to
depend on that.  Especially since VOID is some kind of "undefined"
value, nobody says this representation can't change.  I don't think
you should depend on this implementation detail.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgpTa7SjfAzHd.pgp
Description: PGP signature


reply via email to

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