At 04:57 PM 9/19/00 -0700, Nathan Wiger wrote:
>Following Glenn's lead, I'm in the process of RFC'ing a new null()
>keyword and value that will do this:
>
>   $a = 1;
>   $b = null;
>   $c = $a + $b;
>
>$c is null, not 1.
>
>Since undef() has established semantics, I don't think these should
>change. I believe taking from RDBMS and adding null() which has the
>correct NULL semantics is the way it should go.
>
>One thing I'll add is the posibility to decide whether you want your
>variables initialized to undef() or null():
>
>    use initialize 'null';
>
>Or something like that. Easy integration of DBI here we come...
>(hopefully) :-)

What DBI integration does this facilitate?  SQL uses NULL to denote a 
missing table entry.  It's outside the domains of numbers, strings, BLOBs, 
CLOBs, and everything else RDBMSes use.  So is undef in Perl.  The two 
appear made for each other.  I've got DBI modules that translate NULL to 
undef and vice versa and everything works fine.

Why do you want to be able to reproduce the NULL propagating in SQL 
expressions in Perl?  I cannot think of a use.  I can think of plenty of 
confusion caused by a 'null' keyword, which is why I thank Larry et al 
daily that they didn't put one in Perl.  Who else is tired of conversations 
like "... the null string - and by that I mean an empty string, not a 
string containing the NUL character, although of course an empty string 
actually is terminated by the NUL character, but you don't put it in..."

--
Peter Scott
Pacific Systems Design Technologies

Reply via email to