with and shadowing variables
baz
b2.temp at gmx.com
Mon Jul 23 12:34:39 UTC 2018
On Sunday, 22 July 2018 at 12:13:43 UTC, Anonymouse wrote:
> I'm hesitant to file a bug because it'll just be immediately
> closed with a link to
> https://dlang.org/spec/statement.html#WithStatement. I
> understand that's how it works, but it's weird and weak to
> human mistakes.
IMO the only reasonable thing to do with `with` is not to use it,
generally speaking.
Maybe in D the only exception would be with an named enum ( the
final switch pattern). But otherwise the WithStatement, D or not,
is known for being a big nono.
More information about the Digitalmars-d
mailing list