[Issue 3847] To avoid a C code bug
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 20 18:34:07 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3847
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #13 from bearophile_hugs at eml.cc 2010-09-20 18:30:52 PDT ---
(In reply to comment #12)
Stewart Gordon:
> But because && and || are by far the most commonly used forms, and
> probably most modern languages with C-derived syntax are designed on
> this very basis, deprecating them would probably confuse the
> programmer by making D the odd one out.
I understand this. On the other hand Python and Delphi use 'or' and 'and'
(Python is partially derived from C). I know some Python programmers interested
in D.
> D has continued this trend by doing away with the little-used and and or.
And D uses a semicolon where Java uses 'implements' and 'extends'.
> OK, so D has is and in, but these aren't things for which other
> C-like languages have symbols
In Python 'is' and 'in' have similar semantics.
> And maybe get confused when they find that they don't behave in the
> same way as in Perl and PHP.
Probably this is a confusion for D newbies only, while what I have suggested is
meant to help life of normal D programmers.
> How's that a bug? When a and b are bools, they behave the same!
OK. I close this enhancement request. If I will find other bug-prone situations
I will reopen it. Thank you.
--
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