Another, is it a bug?
Meta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Sep 16 06:18:50 PDT 2015
On Wednesday, 16 September 2015 at 03:48:59 UTC, Random D user
wrote:
> Yeah... I guess I was expecting it to overload across class
> boundaries. I mean there's already a member eat in base class
> and sub class can't override that since it's got different
> parameters, and it's a function (can't be variable), so the
> reasonable thing would be to overload it (which is why I tried
> override to see if it forces/hints overriding/overloading).
> Instead it creates two ambiguous names of which only one has to
> be disambiguated to use which seems super error prone. IMO it
> should just be error/warning.
>
> Given that, normally properties are just overloaded methods in
> D, it's pretty sad classes break this behavior/convention.
It's the exact same as in Java, and probably C# as well. I don't
know if there's any OOP language that overloads methods between
the base and super class.
https://ideone.com/En5JEc
More information about the Digitalmars-d-learn
mailing list