"with" should be deprecated with extreme prejudice

Nick Sabalausky a at a.a
Sun May 17 21:32:59 PDT 2009


"Georg Wrede" <georg.wrede at iki.fi> wrote in message 
news:guqdmn$1tks$2 at digitalmars.com...
> Andrei Alexandrescu wrote:
>>
>> I therefore submit that "with" is an extremely dangerous feature and 
>> should be removed from the language. What say you?
>
> Non-touch typers will riot.

I'm not a touch-typer, but I've never seen much of a point to "with". If I 
have to access a bunch of members of "foo.member.x.bar[17].fizzle", I'll 
just do "auto fizz = foo.member.x.bar[17].fizzle;" and use that, or put it 
into a function that takes a "typeof(fizze)", or do something else along 
those lines. I've yet to come across a case where something like that isn't 
perfectly sufficient. 





More information about the Digitalmars-d mailing list