Python-like tabs instead of curley brackets?

Walter Bright newshound at digitalmars.com
Sun Oct 29 20:46:25 PST 2006


Daniel Keep wrote:
> Another interesting thing is Lua code: it doesn't require you to use an
> explicit statement separator; it's smart enough to "know" where
> statements start and end.  And yet the majority of Lua code I've seen
> uses those redundant semicolons and parenthesis.  Why?  Not really sure;
> could be they're either so C-style brain-damaged they can't code without
> compulsively hitting those keys (must... insert... delimiters...), or
> they just like the additional explicitness.

Adding the ';' makes it a lot easier for the compiler to give reasonable 
targetted error messages when the syntax is wrong. Not only does it give 
the parser an obvious "resynchronize" marker, it helps the user 
"resynchronize" when faced with complex text.



More information about the Digitalmars-d mailing list