News for hackers. Stuff that matters.
Re:Adding Modules to C in 10 Lines of Code [pdf] by WalterBright on Monday June 27, 2022 @02:20PM (#31898509)
Yes, it is RAII and RAII is fully implemented in D.
Re:Adding Modules to C in 10 Lines of Code [pdf] by alphaglosined on Monday June 27, 2022 @03:26PM (#31899535)
But only for structs.

We really need to get actual reference counting into the language to cover classes properly as well.

It has been on my todo list to write a DIP for this for a while now. ~rikki.

Re:Adding Modules to C in 10 Lines of Code [pdf] by ntrel on Tuesday June 28, 2022 @09:17AM (#31907290)
Class instances can go on the stack too using `scope`:

  scope obj = new Object;
  ...
  // destroyed at end of scope