Alternatives to OOP in D

Brother Bill brotherbill at mail.com
Mon Nov 10 08:53:29 UTC 2025


On Monday, 10 November 2025 at 06:20:42 UTC, Peter C wrote:
> On Sunday, 9 November 2025 at 21:49:50 UTC, monkyyy wrote:
>> On Sunday, 9 November 2025 at 04:06:21 UTC, Peter C wrote:
>>>
>>> Please stop disparaging OOP and OOP programmers.
> btw. This is precisely the reversion to a lower-level concern 
> that the founders of OOP sought to avoid.
>
> But.. let's not go there..  ;-)

There is OOP done right, which is mainly done by Eiffel language, 
which supports Multiple Inheritance without the Diamond of Death, 
nor needing Interfaces.

All the rest add complexity with Interfaces and only support 
single inheritance.
D falls into this group.

Bill Gates considered supporting Eiffel language as a Microsoft 
language along with C# and VB.NET, but Eiffel's support of 
Multiple Inheritance made function dispatching (which version of 
this function should be called) take a little bit longer than a 
standard vTable lookup.  It was a constant time lookup, but took 
a few more steps, thus slowing the program execution.  The other 
thing is that Eiffel compilation, even with "Melting Ice" and 
modern workstations still takes significantly more time than 
compiling C# for example.

There should be one rule which is:  Whatever language or pattern 
that you are using, the program should be "correct", that is, 
obey the "business rules".


More information about the Digitalmars-d-learn mailing list