What's the go with the GC these days?
Walter Bright
newshound2 at digitalmars.com
Sun Jan 6 06:54:21 UTC 2019
On 1/5/2019 8:52 PM, Neia Neutuladh wrote:
> The only other way I know of to implement a write barrier is to insert
> some code on every pointer write. GC-as-a-library would require you to use
> their pointer type instead of the builtin, and I expect most C++ devs
> would rather just use a reference counting pointer type instead.
Microsoft tried this with their "Managed C++" variant of C++, where they had two
fundamental pointer types. It was a laudable effort, but failed to gain
traction. D learns from that mistake :-)
> Either the speed has improved, or they're just eating the time cost.
The fact that Java/Go/etc. use inserted write gates suggest the speed hasn't
improved, which leaves eating the cost.
> The other side effect is that you (and the GC) have to be very careful
> about replacing other segfault handlers.
Yeah, you can do that with a sandboxed language, but not one that is a systems
programming language where users will want to use to muck about with segfault
handlers themselves.
More information about the Digitalmars-d
mailing list