[Issue 3847] To avoid a C code bug

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 3 12:10:09 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3847



--- Comment #7 from bearophile_hugs at eml.cc 2010-05-03 12:10:07 PDT ---
In C++ no one used them. But it can be just a matter of nudging D programmers
in the right direction with the style guide and commonly accepted idioms for
writing D code fist, and few years from now with warnings of deprecation of the
bug-prone || &&, before removing them from some future version.

Python uses the "and" and "or" and shows how better they are: they just look
better and more natural, are simpler and faster to type, they make the code
less visually noisy, are written as they are read aloud, and they avoid some
bugs like the one I've shown at the top (the presence of such bugs can be seen
from the fact that both the Gimpel lint warns about an error like the one of
the original top, and recent GCC versions have warning for such probably
erroneous usage of bitwise operators). It's a change for the better.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list