Re: [RFC] export TRUE and FALSE from someplace



Bjarne Steinsbø <bosteins broadpark no> writes:

This discussion could easily turn into a religious war...  I don't
really like to make any contribution towards that end, but anyway,
here are my own two cents:

Firstly, if a value is to be chosen for FALSE, I feel that 'undef'
is a better choice than '0' in perl.  Look at

  $a = (1 == 0);

Zero is also false, that is true, but a true boolean expression in
perl returns undef or one, not zero or one.  (Sorry, I can't help
it.  Writing about boolean logic just makes it too easy to play on
words... :-)

Secondly, I never liked TRUE and FALSE constants in the first place.
I think this is because I feel that they fall between two chairs.
They are unnecessary (don't improve readability) in code like

i agree with you




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]