On 03/20/2011 11:56 PM, KennyTM~ wrote:
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();
Indeed, I don't mean you can replace ';' by newline in D without breaking code!
Denis
--
_________________
vita es estrany
spir.wikidot.com