[Off-Topic] John Carmack's point of view on GC and languages like JavaScript

wjoe invalid at example.com
Thu Aug 11 13:20:13 UTC 2022


On Monday, 8 August 2022 at 16:59:20 UTC, ryuukk_ wrote:
> On Monday, 8 August 2022 at 15:05:49 UTC, wjoe wrote:
> [...]
>
>> On Sunday, 7 August 2022 at 21:25:57 UTC, ryuukk_ wrote:
>>
>> I'm not on the anti-GC train, i use it myself in some of my 
>> projects, i find it very useful to have
>>

I don't understand where in my post I implied that you are on the 
anti GC train.
You brought up the discord thing to make a point that GC's have 
bottlenecks and allocators are the solution?
However, their solution to a GC bottleneck was not to fix it by 
using allocators but to dump their Go code in favor of a Rust 
port.
Neither can I see a connection of Go's GC's bottleneck to D's nor 
how allocators would fix it.
Go's GC would still run a collection every 2 minutes.
So you would either need a GC.disable to stop it from collecting 
where you can't suffer the impact, with a GC.collect to run it 
when it suits you, or you would need to completely disable the GC.
Or you port your entire code base to a non-GC language.

>> The point i am trying to make is D has the capabilities to 
>> provide a solution to both GC users and people whose 
>> performance constraints prohibit the use of a GC
>>
>> But for some reason, people in the community only focus on the 
>> GC, and disregard anything else, preventing me to properly 
>> advertise D as a pragmatic solution

Maybe because the GC has no disadvantage to them. But that's my 
own guess.
If you absolutely can't suffer a GC, there's -betterC, in case 
you didn't know.

I guess it's an ignorant point of view, but I don't see how 
someone whose constraints for writing high-performance, and/or 
real-time, and/or embedded/micro-architecture code, which 
prohibits the use of a GC, would find D-Runtime/Phobos meeting 
their requirements.
There's at least one lightweight implementation of D-Runtime.
And Phobos? Everything that allocates or is templated will likely 
be too slow/bloated in that case, thus a specialized solution 
that takes advantage of context seems to be necessary.



More information about the Digitalmars-d mailing list