On 06/09/2013 11:09 AM, deadalnix wrote:

> On Sunday, 9 June 2013 at 10:22:22 UTC, Jonathan M Davis wrote:

>> I'd argue that it would make code harder to read, because it hides where
>> the variables are coming from.

+1. A friend of mine is "still experimenting" with 'with' and I hate reading his code. :)

with (new C()) {
    i = 42;    // is that a member of C?
    j = 43;    // how about that?
    foo();     // and that?
    bar();     // and that?
}

Thanks for obfuscating! :)

> switch(foobar) with(FoobarEnum) {
>      // ...
> }
>
> That is golden !

+1000 :o)

To me, 'with' is useful only in that case.

Ali

Reply via email to