Thread overview | |||||
---|---|---|---|---|---|
|
January 18, 2005 multiple inheritance | ||||
---|---|---|---|---|
| ||||
could anyone please direct me to a discussion about dropping multiple inheritance? I'm sure this has been on the forum in the past but I can't find a search function. I consider multiple and virtual inheritance an important feature. dropping it means dropping a part of type safety, among other things. thank you, Stefan |
January 18, 2005 Re: multiple inheritance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan | Stefan wrote: > could anyone please direct me to a discussion about dropping multiple > inheritance? > I'm sure this has been on the forum in the past but I can't find a search > function. You could try Thunderbird, which has an excellent news search function ? http://www.mozilla.org/products/thunderbird/ > I consider multiple and virtual inheritance an important feature. dropping it > means dropping a part of type safety, among other things. D now has a single-rooted Object hierarchy, and the mixin feature. Along with interfaces, that should cover *most* cases of using MI ? http://www.digitalmars.com/d/overview.html says: > Features To Drop > Multiple inheritance. It's a complex feature of debatable value. > It's very difficult to implement in an efficient manner, and compilers > are prone to many bugs in implementing it. Nearly all the value of MI can > be handled with single inheritance coupled with interfaces and aggregation. > What's left does not justify the weight of MI implementation. So I don't think that it will be in D, any more than it is in Java ? Just as with the C++ references (&), there are a few cases left. But they haven't been deemed important to change the language... --anders |
January 18, 2005 Re: multiple inheritance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan | In article <csigv7$l8v$1@digitaldaemon.com>, Stefan says... > >could anyone please direct me to a discussion about dropping multiple >inheritance? >I'm sure this has been on the forum in the past but I can't find a search >function. Try this: http://www.digitalmars.com/advancedsearch.html Also, Wiki4D is searchable: http://www.prowiki.org/wiki4d/wiki.cgi?Search >I consider multiple and virtual inheritance an important feature. dropping it means dropping a part of type safety, among other things. It's not so much that multiple inheritence has been dropped from D. It's more that it was never added. ;) Here's a short explanation why D doesn't have MI: http://www.digitalmars.com/drn-bin/wwwnews?D/67 And here's some code that shows how the lack of MI might be worked-around: http://www.digitalmars.com/drn-bin/wwwnews?D/25856 I'm sure there's a lot more discussion about MI out there, but I'll leave for you to find it if you really want to beat that old dead horse. :) >thank you, >Stefan jcc7 |
Copyright © 1999-2021 by the D Language Foundation