IssueRaiser

> Nobody's saying you can't do it.

> Nobody's saying you can't do it. But RAII makes it way easier. Except RAII doesn't work for heap allocated object and then it is back to reference counting. > You'll discover you want the correct behavior in the presence of exceptions. In short, you want RAII. Well, then one would have implemented a GC by hand with worse performance, specially in multi-threading contexts, unless there is someone on the team expert in hazard pointers and related performance tricks. Maybe a performance improvement would be for the ANSI C++ standard to mandate that that compilers give special treatment to *_ptr<>(), so that they can elide needless calls, but I don't see it happening. In FP languages one can use the concept of transactions, yes the M word, to encapsulate scope based workflows where the resources are to be released at the end. What I can definitely see killing GC is affine types becoming mainstream, but they need to be made more friendly for the average Joe developer. Rust made them easier than ATS or Cyclone, but still a bit hard. I think ParaSail's work might also be worth checking in this regard.

Posted by pjmlp on Jul 10, 2015, 9:38 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,500 issues0 comments

hackernews (Other)

> Nobody's saying you can't do it.

pjmlpJul 10, 2015, 9:38 AM

> Nobody's saying you can't do it. But RAII makes it way easier. Except RAII doesn't work for heap allocated object and then it is back to reference counting. > You'll discover you want the correct behavior in the presence of exceptions. In short, you want RAII. Well, then one would have implemented a GC by hand with worse performance, specially in multi-threading contexts, unless there is someone on the team expert in hazard pointers and related performance tricks. Maybe a performance improvement would be for the ANSI C++ standard to mandate that that compilers give special treatment to *_ptr<>(), so that they can elide needless calls, but I don't see it happening. In FP languages one can use the concept of transactions, yes the M word, to encapsulate scope based workflows where the resources are to be released at the end. What I can definitely see killing GC is affine types becoming mainstream, but they need to be made more friendly for the average Joe developer. Rust made them easier than ATS or Cyclone, but still a bit hard. I think ParaSail's work might also be worth checking in this regard.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue