feature request: with(var decl) {}
deadalnix
deadalnix at gmail.com
Mon Jul 23 08:37:22 PDT 2012
Le 23/07/2012 16:37, Adam D. Ruppe a écrit :
> I was just thinking about porting a javascript function to
> D that takes an object of params:
>
Let's not add another special case for the declaration can be used here
instead of an expression. This is already the case in if and it will
proliferate.
The real need here is to allow variable declaration to be used as
expressions. And functions too as they are first class citizens now.
This reduces special cases instead of adding new one, and give a much
greater opportunity for expressiveness in the language.
More information about the Digitalmars-d
mailing list