[Issue 10862] Assignment inside if condition still sometimes accepted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 20 21:52:07 PDT 2013


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



--- Comment #10 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-08-20 21:51:59 PDT ---
@Andrej Mitrovic

Well, while I completely agree that that code is horrible and hard to read,
even that's not as bad as running words together, since it least then it's
_possible_ to know for sure what the code says. And even if you consider not
putting a space after an if to be akin to running words together, it's at most
like running two of them together, not a whole sentence, so the impact is very
different.

But regardless, I don't really want to get into an argument about this. Code
formatting style is a very subjective thing, and one person's perfect style
could be another person's worst nightmare. If you prefer an extra space after
the if, because you think that it improves legibility or for any other reason,
that's fine. Format your code however you like. But personally, I don't think
that adding the space helps legibility at all or provide any other benefit, and
it takes up additional space, so I never do it in my code.

-- 
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