Michael Lazzaro <[EMAIL PROTECTED]> writes: > On Wednesday, November 26, 2003, at 12:29 PM, Larry Wall wrote: >> If you contrast it with an explicit try block, sure, it looks >> better. But >> that's not what I compare it with. I compare it with Perl 5's: >> >> $opus.write_to_file($file) or die "Couldn't write to $file: $!"; >> >> That has some known problems with false positives, er, negatives, >> which Perl 6 addresses with things like: >> >> $opus.write_to_file($file) err fail "Couldn't write to $file: $!"; >> >> But if we're going to talk about philosophy, we should talk about >> Perl's notion of not forcing people to escalate all the way to >> exceptions when a lesser form of undefinedness or falseness will do. >> Perl 6 doesn't back off from this. In fact, it takes it further >> by allowing you to return unthrown exceptions as "undef". And by >> providing a "fail" that either returns or throws the exception >> depending on the preferences of the caller. > > Well, yes, hmm, har, but... > > Speaking only for myself, my own (database-heavy) code already makes > pretty extensive use of the differences between "false", > "unknown/undefined/NULL", and "worthy of exception" -- all three of > those conditions may exist at various times, and no two of them can > reasonably be lumped together as being logically identical.
So implement a *real* NULL instead of trying to force 'undef' somewhere it doesn't want to go.