Re: Alternatives to OOP in D

2025-09-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On Monday, 1 September 2025 at 13:58:23 UTC, Brother Bill wrote: I have heard that there are better or at least alternative ways to have encapsulation, polymorphism and inheritance outside of OOP. With OOP in D, we have full support for Single Inheritance, including for Design by Contract (ex

Re: Alternatives to OOP in D

2025-09-01 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Sep 01, 2025 at 01:58:23PM +, Brother Bill via Digitalmars-d-learn wrote: > I have heard that there are better or at least alternative ways to > have encapsulation, polymorphism and inheritance outside of OOP. > > With OOP in D, we have full support for Single Inheritance, including >

Re: Alternatives to OOP in D

2025-09-01 Thread monkyyy via Digitalmars-d-learn
On Monday, 1 September 2025 at 13:58:23 UTC, Brother Bill wrote: I have heard that there are better or at least alternative ways to have encapsulation, polymorphism and inheritance outside of OOP. With OOP in D, we have full support for Single Inheritance, including for Design by Contract (ex

Re: Alternatives to OOP in D

2025-09-01 Thread Kapendev via Digitalmars-d-learn
On Monday, 1 September 2025 at 13:58:23 UTC, Brother Bill wrote: I have heard that there are better or at least alternative ways to have encapsulation, polymorphism and inheritance outside of OOP. With OOP in D, we have full support for Single Inheritance, including for Design by Contract (ex

Re: Debug help - Ranges - Programming in D page 598

2025-09-01 Thread Steven Schveighoffer via Digitalmars-d-learn
On Friday, 29 August 2025 at 01:51:27 UTC, Steven Schveighoffer wrote: On Friday, 29 August 2025 at 01:24:40 UTC, Steven Schveighoffer wrote: Will file an issue, and we should get this fixed. https://github.com/dlang/phobos/issues/10852 Fixed! https://github.com/dlang/phobos/pull/10854 Wi

Re: Alternatives to OOP in D

2025-09-01 Thread Serg Gini via Digitalmars-d-learn
On Monday, 1 September 2025 at 13:58:23 UTC, Brother Bill wrote: I have heard that there are better or at least alternative ways to have encapsulation, polymorphism and inheritance outside of OOP. With OOP in D, we have full support for Single Inheritance, including for Design by Contract (ex

Re: Is D painted into a corner?

2025-09-01 Thread user1234 via Digitalmars-d-learn
On Monday, 1 September 2025 at 12:20:02 UTC, Kapendev wrote: Insane way to do things: ```d struct Matrix(R, C, T, bool canFly, bool isCute) if ((isNumberType!T || isMathType!T) && isGoodType!T && isMagicType!T) { static if (canFly) { this(Blah blah) { // Blah blah...