News for hackers. Stuff that matters.
Re:Why general inheritance is flawed and how to finally fix it by pjmlp on Monday December 13, 2021 @02:35AM (#29537578)
COM solves this with delegation, where objects can only implement the methods that they care about and delegate everything else to the aggregated type, which provided the full interface.

However, depending on which stack one is using (VB 6, .NET, MFC, ATL, WRL, WinRT), the amount of boilerplate to deal with the runtime differs.

Re:Why general inheritance is flawed and how to finally fix it by iainmerrick on Monday December 13, 2021 @05:41AM (#29538405)
I wish more languages (in fact, any popular languages!) had convenient syntax for this.
Re:Why general inheritance is flawed and how to finally fix it by pjmlp on Monday December 13, 2021 @10:14AM (#29540279)
Dynamic languages have it, via "doesNotUnderstand" and similar.

Kotlin also provides a way similar to those COM variants,

https://kotlinlang.org/docs/delegation.html#overriding-a-mem...

Best support is probably MOP in Common Lisp, I guess.

Re:Why general inheritance is flawed and how to finally fix it by iainmerrick on Monday December 13, 2021 @11:58AM (#29541424)
The Kotlin version is pretty much what I had in mind, that's pretty nice.
Re:Why general inheritance is flawed and how to finally fix it by CRConrad on Thursday December 16, 2021 @11:36AM (#29580103)
Any time one dares to defend Pascal's "with" statement, a shitstorm starts...