Re: Haskell is our first choice for building production soft...
by andrekandre on Tuesday January 12, 2021 @12:27PM
(#25750091)
good question, i guess it depends on the language... multiple inheritance without namespacing would either result in either method getting chosen randomly, or a build error...
for example, in swift you cant even inherit from two protocols that have default implementations... and i think in c++ you also cant call the method without specifying namespace...
so, i suppose, if you wanted to go all the way, you could even do namespace inference
def sepulka(zagizuga)
zagizuga::Something.doSomething()
zagisuga.doSomethingElse()
so zagizuga is infered to be some type that inherits from `Something` namespace and expects that namespace to defined `doSomething()` function, in addition to providing `doSomethingElse()`though that seems getting a bit fragile irl maybe...
E.g, A implements virtual doSomething() and B and C inherit from A, add some different fields and both implement doSomethingElse() which they should overload for their inheritance from class Z.