News for hackers. Stuff that matters.
Re:D Programming Language by tgv on Friday February 13, 2026 @03:57AM (#47000557)
But if I'm not mistaken, this is just handling index allocation, release and avoiding dangling manually. The programmer is still responsible, right? And I don't think Rust can do better for indices, since indices are normal, "eternal" values.
Re:D Programming Language by fooker on Friday February 13, 2026 @12:27PM (#47005254)
> this is just handling index allocation, release and avoiding dangling manually

No, it is abstracted away. You just have to follow best practices when writing a library.

  resource foo(...); // This gets freed at the end of scope. See RAII.
  auto x = make_unique<resource>(...); // can be moved, freed when owner is.
  auto y = make_shared<resource>(...); // freed on zero reference count