[Issue 2659] Remove the comma operator

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 28 01:07:12 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=2659


Casper Færgemand <shorttail at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shorttail at hotmail.com


--- Comment #4 from Casper Færgemand <shorttail at hotmail.com> 2014-02-28 01:07:10 PST ---
vec = overloaded vector type of size 3.

What I meant to write:
vec v = vec(0, 0, 3);

What I actually wrote:
vec v = (0, 0, 3);

Result:
vec v = 3; // as in vec(3, 3, 3);

It was quite nasty. Considering D doesn't allow statements like 3; I don't see
why it isn't an error to do it when using the comma operator in an assignment.
It literally just throws away everything with no side effect.

Or make it easy and just remove the comma operator completely in its current
form.

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


More information about the Digitalmars-d-bugs mailing list