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: Graham Fawcett
Subject: Re: [Chicken-users] New immediate values (was: DBI)
Date: Thu, 28 Feb 2008 22:19:27 -0500

On Thu, Feb 28, 2008 at 7:31 PM, Tobia Conforto <address@hidden> 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))

I think that, to work well, we'd have to define it statically, so that
all libraries using (sql-null) would have the same immediate value.
E.g.

#>!
static C_word sql_null = ((C_word) ((C_word)(C_SPECIAL_BITS | 0x00000040)));
<#

I am not a core hacker, and can't forsee the consequences of doing
this, though...

Graham




reply via email to

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