Feedback on Átila's Vision for D
atila.neves at gmail.com
Thu Oct 17 16:26:07 UTC 2019
On Thursday, 17 October 2019 at 15:24:09 UTC, Rumbu wrote:
> On Thursday, 17 October 2019 at 12:51:17 UTC, Atila Neves wrote:
>> On Wednesday, 16 October 2019 at 18:34:01 UTC, Rumbu wrote:
>>> On Wednesday, 16 October 2019 at 17:40:42 UTC, Atila Neves
>>>> On Wednesday, 16 October 2019 at 16:42:28 UTC, Rumbu wrote:
>>>>> On Tuesday, 15 October 2019 at 13:09:15 UTC, Mike Parker
>> What is it about OOP in D that you find lacking?
> The general attitude "OOP is bad, let's use a struct instead".
I don't know what to do about this. I prefer structs myself.
> The fact that objects are by default allocated using gc.
Only if you use `new`. And if you don't, then you'll have to
worry about memory management.
> There is no language construct to use RAII or heap application
> on objects. We had scope but it was deprecated.
That would be news to me. Even if `scope obj = new MyClass;` got
deprecated, there are library solutions.
> The fact that class encapsulation is not fully implemented.
> Private is not so private.
This is by design and isn't going to be changed. Classes can be
in their own module if needed.
> Structs cannot implement interfaces (see next point for usage).
Also by design, unless you want something like Rust's traits or
Haskell's typeclasses. But none of this is OOP.
More information about the Digitalmars-d