On Thursday, 12 February 2015 at 08:14:49 UTC, Mike Parker wrote:
On 2/12/2015 6:42 AM, ketmar wrote:


this problem has very easy solition: we should stop calling class dtors
"destructors", and rename them to "finalizers".


Absolutely. So many people coming from C++ see "destructor" and want to use them as they did in C++. How often do we see people coming on here wondering why they can't get deterministic destruction out of class destructors? Of course, it's too late to change anything now, but we need a big, obvious link from the docs and the wiki and anywhere else people can read about destructors to a page that explains how D class destructors are not C++ class destructors.

http://p0nce.github.io/d-idioms/#The-trouble-with-class-destructors

I've also made one for "D can't do real-time because it has a stop-the-world GC"
http://p0nce.github.io/d-idioms/#The-impossible-real-time-thread

And one for "D doesn't have ADTs"
http://p0nce.github.io/d-idioms/#Recursive-Sum-Type-with-matching

Reply via email to