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

max haughton maxhaton at gmail.com
Tue Aug 9 16:32:09 UTC 2022


On Tuesday, 9 August 2022 at 14:36:13 UTC, ryuukk_ wrote:
> On Tuesday, 9 August 2022 at 14:03:47 UTC, Patrick Schluter 
> wrote:
>> On Monday, 8 August 2022 at 19:49:16 UTC, H. S. Teoh wrote:
>> <snip>
>>> [...]
>>
>> Exactly. That's why I always call the C++ and Rust for 
>> performance (Rust for safety is a bit different) as POOP 
>> languages: Premature Optimization Oriented Programming 
>> languages.
>
> GC is also a premature optimization
>
> Do you need it when you write a 1 step cli tool? no you don't, 
> DMD disables it
>
> The key is to understand your domain and pick the right tool 
> for the job
>
> We should not fall into the trap of using a screwdriver for 
> everything; our strength is our ability to have a GC, but also 
> stray away from it whenever you domain requires it, vice versa
>
> That's in the vision document, and Atilla perfectly explained 
> it at DConf
>
> And the doom example from Manu is the perfect real world 
> usecase of my point
>
> Some interesting thread:
>
> https://twitter.com/TheGingerBill/status/1556961078252343296

dmd not freeing by default is/was a bad idea. The memory usage on 
large projects is catastrophic.

So just enable the GC? In theory yes but in practice people hold 
references to stuff all over the place so the GC often can't 
actually free anything.


More information about the Digitalmars-d mailing list