[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] New immediate values (was: DBI)
From: |
Kon Lovett |
Subject: |
Re: [Chicken-users] New immediate values (was: DBI) |
Date: |
Sat, 1 Mar 2008 08:03:54 -0800 |
Hi,
I like the "sql-null" egg, it even has support for 3-valued logic.
The actual NULL value, "null-value", is an implementation detail but
I think '(void)' is ok. Is the probability that some SQL column value
function will misinterpret '(void)' as a parameter or return '(void)'
with some other meaning that high? Well, maybe, so:
(define sql-null-value (##sys#make-structure 'sql-null)) ; I like the
record since it prints
(define (sql-null) sql-null-value)
(define (sql-null? o) (eq? sql-null-value o))
The use of "null?" seems nice but the list operation names in Scheme
are a historical holdover from older Lisps and not generic operations
- despite the names; a mistake IMHO, I would prefer "list-for-each",
"list-null?", "list-pair?", "cons-pair?", etc.
Restricting the domains of column values to support NULL is also not
nice - I too see symbols & lists as possible.
If it becomes an issue then define "string?/null", "number?/null",
etc. The contagion idea (I know not an actual suggestion) I really
don't like - #unspecified is not bottom.
And thankfully the mooted new immediate value idea has been dropped.
Best Wishes,
Kon