On Mon, 30 Apr 2012 09:39:15 +0200, Jacob Carlborg <[email protected]> wrote:
On 2012-04-30 02:40, Robert Clipsham wrote:
On 28/04/2012 20:22, Dmitry Olshansky wrote:
3. with statement (?). I kind of like it but bleh it's too boggy and it
doesn't seem to pull its weight. (pointers? class references? a lot of
stuff to go wrong) Fluent interfaces solve a good portion of its
benefits to be specific.
My primary use case for the with() statement is with final switch:
final switch(something) with(MyEnumWithAPrettyLongName)
{
case A: // Save repeating myself everywhere
break;
. . .
}
That's the only thing I used the with-statement for.
I use it to "fake" object initializers from C#:
http://msdn.microsoft.com/en-us/library/bb384062.aspx
A feature I love in C# and would like to see in D.