Chaim Frenkel wrote:
> What about a hypothetical, use tristate. This would give undef some
> extra special powers.
There is a difference between "undefined" and "unknown".
SQL NULL, and the resultant tristate operators used in SQL, specifically is based
on NULL representing the "unknown" value.
Perl undefined is a different concept--that of an uninitialized variable. This is
proven from its earliest versions where the value is coerced to 0 or '' (specific
values) when used (without warnings on).
Some Perl programs & modules (including DBI) attempt to correlate NULL and
undefined, for lack of a better match of concepts (Perl is missing the concept of
NULL, SQL is missing the concept of undefined, but that doesn't correctly imply
that the concepts each language _does_ have are correlated, or should be).
If you want NULL, RFC it is a new concept. DBI could then be ported to Perl 6,
and the power of using NULL in its operators (perhaps together with transactional
variables) could make Perl an extremely powerful database manipulation language
and would make the language, complementary to and augmenting SQL in ways no other
language currently does.
Do not attempt to further the inappropriate correlation between undefined and
NULL.
Any OO language with full operator overloading could write objects/operators that
behave like SQL values, and implement tristate logic for those objects, just like
SQL does. Perhaps you should attempt that, and RFC the failures. I would
recommend, however, that you not attempt to use the concept of undefined to
implement the concept of NULL, at least not visibly...
--
Glenn
=====
Even if you're on the right track,
you'll get run over if you just sit there.
-- Will Rogers
_______________________________________________
Why pay for something you could get for free?
NetZero provides FREE Internet Access and Email
http://www.netzero.net/download/index.html