Glenn Linderman <[EMAIL PROTECTED]> writes:

> In my opinion, which you probably will also not agree with, attempting
> to toggle between the current undef semantics and tristate semantics is
> like trying to stuff three values into one bit.

I do understand the argument.  I just see confusion either way, and I
think that approach would be the least confusing and allow the code to
remain the most Perl-like.  I can see arguments the other way; that's just
my opinion.

> The problem is, when you toggle the pragma, all variables whose value is
> undef suddenly have the tristate semantics, and when you toggle it back,
> all the variables whose value is undef suddenly have the undef
> semantics.  This leaves it purely to the programmer to make sure that
> the pragma is used in exactly the right places, and, when tristate
> semantics are in effect makes unavailable the normal, helpful warnings
> that Perl produces when you attempt to misuse undef values.

Perhaps I don't use those warnings in the same way that you do.  I *very*
rarely have undefined value warnings in my programs, and when I do they're
usually not actually bugs, just things that require a different way of
writing to be -w clean.  So I don't have as high of an opinion of this
warning as being particularly important to debugging; I only find it
useful in certainly particular circumstances.

To me, toggling the semantics of the variables which are already undef
strikes me as just what I'd want.

> I guess that since you have no intention of using the tristate
> semantics, you don't care whether it is easy to code using them.

Comments like this are what is making it very difficult for me to continue
discussing this with you.  You don't actually know what type of Perl I
write or whether or not I'd use the semantics or not.  As a matter of
fact, I find them very interesting and fully do expect to use those
semantics if they're implemented in Perl, particularly given that I'm
likely to be doing a lot more database and SQL coding in the future than I
am currently.

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to