On 04/30/2012 05:35 PM, H. S. Teoh wrote:
On Mon, Apr 30, 2012 at 10:21:23AM +0200, bearophile wrote:
H. S. Teoh:

I think the correct solution here is to use alias. (If that doesn't
work, then it should be made to work. It's a lot cleaner and doesn't
introduce potentially nasty ambiguities into code,

What ambiguities?
[...]

When you have nested with's.

Or when the object members shadow local variables in the parent scope.

        struct S {
                int x;
        }

        void main() {
                int x, y;
                S s;

                with(s) {
                        x = 1;
                        y = 2;
                }
        }

[snip.]

You probably should try compiling that code. ;)

Reply via email to