Closed wilzbach closed 6 years ago
From @burner on June 20, 2016 14:45
I think we should have, a chat about that. I think you should not spend to much time on solving a problem (GC problem) that the D community has not solved in a lot of time. I know I said a DOM without GC allocated memory would be nice, but not to an extend that you don't get the DOM done or anything else. I think we have to find a reward effort balance. Do you have time to talk today tonight?
From @d-random-contributor on June 24, 2016 8:36
If DOM is not @nogc-friendly, it's probably ok to leave it relying on gc, if there can be a more @nogc-friendly API, it can be also simpler, e.g. there's an xml API that uses just Node
s without much classes.
From @lodo1995 on June 24, 2016 14:6
@d-random-contributor maybe I'm not getting your point. Are you talking about the DOM Specification explicitly stating that Node
can be used to do everything without classes and polymorphism? The problem is that you still have circular references between the Node
s, which have to be handled someway, and standard refcounting won't work.
But maybe I'm misunderstanding what you said...
From @lodo1995 on July 13, 2016 19:24
Closing, as another direction has been taken.
(accidentally moved)
From @lodo1995 on June 20, 2016 12:41
The main superiority of garbage collection wrt to reference counting is the ability to easily collect objects with circular references, like, for example, the Document Object Model classes.
Thus, to make the DOM usable without resorting to gc, a slightly modified rc approach must be used, as the current one leaks most of the allocated objects.
Copied from original issue: lodo1995/experimental.xml#16