|
No matter how we choose to think about the grammar, it is certainly the case that try-catch-finally is different than if and while and for and so on; try-catch-finally requires a braced block. That seems inconsistent; is there a justification for this inconsistency? The last thing we need in this language is more ambiguity.
|
|
|
|
|
Yes; if , while , for , etc. should all require braces.
It's all Dennis Ritchie's Ken Thompson's fault! He shouldn't be allowed to design languages!
Well, maybe it's our fault for making them so popular.
|
|
|
|
|
PIEBALDconsult wrote: Yes; if , while , for , etc. should all require braces.
Yes! Agreed.
|
|
|
|
|
I remember the argument not so long ago about how outdated the concept of coding standards are. This is one of the standards that I believe is key to any project. Any if, while and for must use braces, even if executing only one statement.
One of the few places where VB.NET have got better syntax though, forcing you to add the End If, End While or Next...
|
|
|
|
|
Terrence Dorsey wrote: The last thing we need in this language is more ambiguity or something else .
FTFY
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|