D is crap
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jul 9 19:28:58 PDT 2016
On Saturday, 9 July 2016 at 11:27:13 UTC, ketmar wrote:
> and with refcounting i have to *explicitly* mark all the code
> as "no refcounting here", or accept refcounting overhead for
> nothing.
That would be automatic reference counting ;-)... Reference
counting is ok for shared ownership, but in most cases overkill.
Garbage collection is also useful in some settings, e.g. in some
types of graph manipulation. Where things go wrong for D is to
use primitive global garbage collection. It would have worked out
ok if it provided only primitive local garbage collection.
So what D needs is:
1. local garbage collection (for a single fiber or a facade to a
graph).
2. solid global ownership management (for both resources and
memory).
Most newbies can then happily write single-threaded code as
usual. More advanced programmers need to deal with shared
ownership. Which they might have to do anyway, since garbage
collection does not handle resources.
More information about the Digitalmars-d
mailing list