why scope(success)?
Daniel Keep
daniel.keep.lists at gmail.com
Fri May 12 03:59:07 PDT 2006
Stewart Gordon wrote:
> <snip>
>
> To be honest, I think a naked declaration as the body of a runtime
> control statement should be illegal.
>
You just reminded me of a feature of a language called Nemerle (which is
a functional superset of C#): it has three conditional statements:
if ... else ...
where ...
unless ...
The thing here is that if you use "if", you must also have an "else"
clause. "where" and "unless" are equivalent to "if(cond) ..." and
"if(!cond) ..." in D.
The rationale behind this is that it solves the problem of ambiguous
chains of if/else. I actually always liked this, but am yet to see it
in any other language.
Speaking of neat stuff Nemerle does: "var" for type inference and
immutable variables ;)
-- Daniel
--
v1sw5+8Yhw5ln4+5pr6OFma8u6+7Lw4Tm6+7l6+7D
a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
More information about the Digitalmars-d
mailing list