https://d.puremagic.com/issues/show_bug.cgi?id=9930
Jonathan M Davis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #10 from Jonathan M Davis <[email protected]> 2013-11-25 20:47:54 PST --- This is similar to being able to call a static member function via an instance rather than the type, which is also something that I think is horrible and ideally would go. Unfortunately, several other languages permit it, but IMHO, it provides no value, is bug-prone, and it actually prevents us from overloading on static-ness (i.e. A.foo() calls the static foo and a.foo() calls the non-static foo), which is particularly problematic for opCall. So, this (as well as being able to call static functions via instances) are the sorts of rules that I find very counterintuitive and negative in terms of their effects. I don't know if we can fix them at this stage in the game (particularly with regards to static member functions, since other languages make the same mistake that we do in that regard), but ideally, D would be fixed so that you can't access an enum member via an instance and so that you can't access a static member via an instance. To allow it is just broken and bug-prone IMHO. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
