Challenge: write a reference counted slice that works as much as possible like a built-in slice
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Wed Nov 10 20:48:57 UTC 2021
On Wednesday, 10 November 2021 at 20:35:57 UTC, Stanislav Blinov
wrote:
> It's a huge win as it allows the language to mandate rules for
> destructor elision, which C++ can't and won't do.
How come? In order to know that something has been moved, you
would also know the state of the object, so I don't see how D get
any advantage over C++ here. Unless you in the type system
distinguish between active and inactive objects.
More information about the Digitalmars-d
mailing list