Re:Making Coffeescript’s Whitespace More Significant
by artsrc on Thursday December 01, 2011 @01:01AM
(#3298583)
These should all be compiler errors because the indentation and the delimiters don't match.
if (expression)
statement;
statement;
statement;
or: if (expression)
statement;
if (expression)
statement;
else
statement;
or if (expression); {
statement;
statement;
}
So curly brace languages should have a defined formatting standard and anything else should be a syntax error.
This is surely why there's so much type information floating around a programming language like Java. (Of course, Java is a little extreme. It's obnoxious to be forced to catch/declare-that-I-throw 50 different exceptions when I do any file I/O, and doesn't bring much to my typical use case. I don't use Java much. :)