On 1/23/07, Paul Seamons <[EMAIL PROTECTED]> wrote:
> While I'm in general agreement with everything you've said it makes me a > tad nervous to hinge so much on the difference of one character. Can you > imagine trying to track down the bug where > > if ($alpha === $beta) { ... } > > really should have been > > if ($alpha == $beta) { ... } > > Anyway, it's not like this problem wasn't already there, it's just that > your email made it stand out to me. I'm not adding support to either side of the issue. I just wanted to point out that with Perl 5 and other current languages I occasionally have to search for that bug right now. Except it is spelled a little different with if ($alpha = $beta) { ... } When I really meant: if ($alpha == $beta) { ... } It is rare though. I think the == vs === will be rare also.
Perhaps. To me, finding the = vs. == bug is a bit easier due to the large conceptual difference between the operators. (or maybe I'm just used to looking for it after 20+ years of coding in languages that have = and ==) But for == vs. ===, they are both comparators and that tends to muddy the waters a bit when it comes to your brain helping you find the bug. (at least it does for me) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]