[Issue 1849] with() should cause shadowing errors if you use a member that's shadowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 4 19:10:23 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1849





------- Comment #6 from wbaxter at gmail.com  2008-03-04 21:10 -------
(In reply to comment #5)
> I agree it can be a problem, and some people argue that the with itself is
> inherently a bad construct for such reasons. They might be right.

They may be.  If there were a way to do "selective with" like selective import
I would probably use that.
   with(BigObject : member, other_member) { ... }

Or if I could alias dot expressions like:
  alias foo.bar bar

then I wouldn't be tempted to use 'with' as often.


-- 



More information about the Digitalmars-d-bugs mailing list