Overloading/Inheritance issue
Aarti_pl
aarti at interia.pl
Wed Aug 1 23:44:24 PDT 2007
Derek Parnell pisze:
> On Wed, 01 Aug 2007 17:37:58 -0400, Steve Schveighoffer wrote:
>> This is very counterintuitive...
>
>> My point basically is why should a coder be forced to declare
>> an alias when realistically there is no reason they would
>> NOT want to declare the alias?
>
> Oh don't get me wrong, I too think that the current rules are totally daft.
> I mean, why does one go to the trouble of deriving one class from another
> if its not to take advantage of members in the parent class?
>
> I vaguely recall Walter saying that he decided to do it this way because it
> is easy to implement this rule into the compiler and it makes the compiler
> run faster. (I am paraphrasing from memory, so I could be totally wrong).
>
> If this is so, then it strikes me that the language is this way in order to
> make life easier for compiler writers than for D coders, which is just not
> right in my POV.
>
... and it's even not consistent with one of D design rules:
"If something looks similar as in C++, it should behave similar to C++."
I think that breaking this rule is main source of confusion here. In my
opinion it would be much better for D to implement inheritance in a way
similar to other C-like languages.
Regards
Marcin Kuszczak
Aarti_pl
More information about the Digitalmars-d
mailing list