The "no gc" crowd

ponce contact at gmsfrommars.fr
Tue Oct 8 15:58:01 PDT 2013


On Tuesday, 8 October 2013 at 22:45:51 UTC, Adam D. Ruppe wrote:
>
> Eh, not necessarily. If it expands to static 
> assert(!__traits(hasAnnotationRecursive, uses_gc));, then the 
> only ones that *need* to be marked are the lowest level ones. 
> Then it figures out the rest only on demand.
>
> Then, on the function you care about as a user, you say nogc 
> and it tells you if you called anything and the static assert 
> stacktrace tells you where it happened.
>
> Of course, to be convenient to use, phobos would need to offer 
> non-allocating functions, which is indeed a fair amount of 
> work, but they wouldn't *necessarily* have to have the specific 
> attribute.

But is it even necessary? There isn't a great deal of evidence 
that someone interested in optimization will be blocked on this 
particular problem, like Peter Alexander said.

GC hassle is quite common but not that big a deal:
- Manu: "Consequently, I avoid the GC in D too, and never had any 
major problems, only inconvenience." 
http://www.reddit.com/r/programming/comments/1nxs2i/the_state_of_rust_08/ccnefe7
- Dav1d: said he never had a GC problem with BRala (minecraft 
client)
- Me: I had a small ~100ms GC pause in one of my games every 20 
minutes, more often than not I don't notice it

So a definitive written rebutal we can link to would perhaps be 
helpful.


More information about the Digitalmars-d mailing list