[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] DBI
From: |
Graham Fawcett |
Subject: |
Re: [Chicken-users] DBI |
Date: |
Thu, 28 Feb 2008 10:02:52 -0500 |
On Thu, Feb 28, 2008 at 2:40 AM, felix winkelmann <address@hidden> wrote:
> On Wed, Feb 27, 2008 at 10:31 PM, Peter Bex <address@hidden> wrote:
> > 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.
> >
>
> Absolutely. Tha values definition of void above is btw not equivalent and
> would break in many places.
I stand corrected. :-)
It would be a smart idea to change the implementation, then, so that
the unspecified value could not be tested with (eq?). That would
prevent it from being 'misused'.
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. Record instances aren't really a great answer
(though I suggested them myself) since different records of the same
type will fail an identity test.
Graham
- Re: [Chicken-users] DBI, (continued)
- void as a return value (Re: [Chicken-users] DBI), Vincent Manis, 2008/02/27
- Re: void as a return value (Re: [Chicken-users] DBI), Ozzi, 2008/02/27
- Re: void as a return value (Re: [Chicken-users] DBI), John Cowan, 2008/02/27
- Re: void as a return value (Re: [Chicken-users] DBI), Vincent Manis, 2008/02/27
- Re: [Chicken-users] DBI, John Cowan, 2008/02/27
- Re: [Chicken-users] DBI, felix winkelmann, 2008/02/28
- Re: [Chicken-users] DBI,
Graham Fawcett <=
- [Chicken-users] New immediate values (was: DBI), Tobia Conforto, 2008/02/28
- Re: [Chicken-users] New immediate values (was: DBI), Graham Fawcett, 2008/02/28
- Re: [Chicken-users] New immediate values (was: DBI), John Cowan, 2008/02/28
- Re: [Chicken-users] New immediate values (was: DBI), Mario Domenech Goulart, 2008/02/29
- Re: [Chicken-users] New immediate values (was: DBI), felix winkelmann, 2008/02/29
- Re: [Chicken-users] New immediate values (was: DBI), Tobia Conforto, 2008/02/29
- Re: [Chicken-users] New immediate values (was: DBI), felix winkelmann, 2008/02/29
- Re: [Chicken-users] New immediate values (was: DBI), Graham Fawcett, 2008/02/29
- Re: [Chicken-users] New immediate values (was: DBI), Tobia Conforto, 2008/02/29
- Re: [Chicken-users] New immediate values (was: DBI), Graham Fawcett, 2008/02/29