D Ranges

Paulo Pinto pjmlp at progtools.org
Sun Sep 15 08:47:10 PDT 2013


Am 15.09.2013 10:52, schrieb Jonathan M Davis:
>...
>
> Yeah. RefCounted could/should definitely be improved, but the concept is
> essentially the same as smart_ptr in C++11. In many ways, smart pointers are
> far superior to using the GC, and I really think that we should do a better
> job of supporting them and promoting them. There are obviously plenty of cases
> where the GC is better or even necessary, but in many cases - particularly
> with objects - smart pointers are arguably a much better way to go.
>
> - Jonathan M Davis
>


Actually, it is much easier to write exception safe code in languages 
with GC. Or in case of ref-counting if the compiler is aware of them.

The problems with exception safe code in C++ with memory leaks are 
related to its C compatibility rules and having to cope to optional 
exceptions.

After watching the Going Native 2013 videos, I really wonder how much of 
a push C++ will win back from younger developers, outside the game 
industry and device drivers.


Now back to C++ coding. :)

--
Paulo


More information about the Digitalmars-d mailing list