Rebind template(bug?)
Lodovico Giaretta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Aug 21 13:41:36 PDT 2016
On Sunday, 21 August 2016 at 20:36:54 UTC, Engine Machine wrote:
> On Sunday, 21 August 2016 at 19:42:08 UTC, Lodovico Giaretta
> wrote:
>> [...]
>
> You're right. I didn't realize that variables could be shadowed
> in classes. Seems dangerous. D doesn't allow shadowing in a
> normal context and gives an error so I don't know why it
> wouldn't do that in classes. (since it wasn't giving an error I
> thought it wasn't shadowing)
You are right. It is very bad. But as far as I know Java and C++
allow this too.
I will open an enhancement request (if there's none about this),
to gather some feedback on the matter.
More information about the Digitalmars-d-learn
mailing list