On 2/8/2018 9:03 AM, Dave Jones wrote:
If D had a decent garbage collector it might be a more convincing argument.
'Decent' GC systems rely on the compiler emitting "write gates" around every assignment to a pointer. These are justified in languages like Java and Go for which everything is GC allocated, but they would be a performance disaster for a hybrid language like D.
More precise GC exacts heavy runtime penalties, too, which is why attempts to add them to D have had mixed results.
I.e. it isn't an issue of us D guys being dumb about the GC.
If going malloc didnt lose you a bunch of features and bring a bunch of other stuff you need to be careful of, that might be a good argument too.
With @nogc, you don't have to be careful about it. The compiler will let you know.
