Challenge: write a reference counted slice that works as much as possible like a built-in slice

Paulo Pinto pjmlp at progtools.org
Wed Nov 10 13:58:23 UTC 2021


On Tuesday, 9 November 2021 at 18:33:01 UTC, Atila Neves wrote:
> On Tuesday, 9 November 2021 at 17:26:32 UTC, Stanislav Blinov 
> wrote:
>> [...]
>
> Could you please explain why you'd rather do that instead of 
> using the equivalent of C++'s std::{vector, unique_ptr, 
> shared_ptr} and Rust's std::{vector, unique_ptr, shared_ptr}? I 
> cannot myself imagine why anyone would want to.
>
> I think that C++'s greatest gift to the world was the 
> destructor. We have those too! Let's use them.
>

Actually that honour belongs to Euclid, C++ made it popular.




More information about the Digitalmars-d mailing list