On Mar 21, 11 05:21, spir wrote:
On 03/20/2011 09:44 PM, bearophile wrote:
They should also let down ';' noise, like Go.
My experience so far has shown me that there are two options:
1) You design the whole language syntax on the fact that most times
you don't use semicolons (see Python and Haskell. Or even Delight);
2) You keep the semicolons obligatory (see D).
Most of the other options I've seen (JavaScript, Go) are train wrecks :-)
You'd have to support such as assertion with some material, I guess ;-)
Lua also lives very well without ';' (except, like Python & Go, for
multi-statement lines).
Python is designed to use \n as the separator. I believe Lua too. D is not.
And I don't see what your point 1) actually means. Ones just need to let
down ';', e basta. There is no syntactic issue with treating newline as
a statement separator or terminator in place of ';'.
Denis
No, you may break existing code by replacing all \n with ;
auto g = longExpression
.readln();
// auto g = longExpression.readln(); ?
// auto g = longExpression; .readln(); ?
if (b)
return a
(c.methodPtr)(d);
// if (b) return a; (c.methodPtr)(d); ?
// if (b) return a(c.methodPtr)(d); ?