Re: Researcher question – what's the point of semicolons and curly braces?

ag0aep6g via Digitalmars-d digitalmars-d at puremagic.com
Tue May 3 22:45:39 PDT 2016


On 04.05.2016 07:27, tsbockman wrote:
> Without any redundancy in the syntax, minor corruption of the code could
> easily result in a program that still "works" - that is, compiles and
> runs without producing an error message - but whose behaviour has subtly
> changed. With redundant syntax, on the other hand, the compiler is more
> likely to detect and pinpoint the problem immediately.

D doesn't have that kind of redundancy either here. For the compiler to 
catch errors, it would have to mind both punctuation and whitespace. But 
whitespace is purely cosmetic in D. Programmers might be alarmed when 
they see a mismatch, but the compiler doesn't care.


More information about the Digitalmars-d mailing list