On 4/30/2014 6:16 AM, "Ola Fosheim Grøstad"
<[email protected]>" wrote:
On Wednesday, 30 April 2014 at 08:52:48 UTC, Chris wrote:
In D you can do this:
if (mode == "TEST") { // Second block added later
if (x == 1) { // First block
writeln("Hurray!");
}
}
Yea, I do that all the time for debugging...*deliberately* since it
makes it trivial to spot the temporary testing code. A language
shouldn't get in my way just because it made a false assumption about my
workflow.
I think Go did the right thing by not requiring the redundant
parantheses on the if statement and perhaps also by allowing the
omission of semicolons where appropriate etc. Room for improved
legibility right there.
Personally, I find Go's reduced parens and such to make it noticeably
harder to read. There's less for my eyes to lock onto when visually
parsing/scanning. YMMV of course.