News for hackers. Stuff that matters.
Re:Nim Community Survey 2019 Results by imtringued on Tuesday February 25, 2020 @08:06AM (#22412840)
>slow compile times

Since when is C slow to compile? C++ is worse but the abuse of templates combined with the header system is the primary cause of the problem, not manual memory management. Just look at the include tree of a conventional application. Even a moderately complex file will only have around 100 included headers in total but once you add boot filesystem you will suddenly see 1000 headers being included into your project into every single file. The header system is necessary because the compiler has to be aware of the sizes of all data types but this can be avoided with the pimpl pattern which again does not require a GC.

The downsides of garbage collection can't be understated. A GC globally influences the entire application including sections that do not use the GC. Therefore there is no opt out way of avoiding the GC in critical sections. If just one section of your application is generating too much garbage it will directly influence critical sections like audio or rendering. Therefore the goal is to do as much as possible without a GC and then add an embedded scripting language that is running a GC. A GC cycle inside the embedded VM only stops the computation that happens inside that VM but since we have already ensured that all non critical sections are running outside of the VM the impact is minimal.

You want things like animations to be smooth and your attacks to hit but it doesn't matter to you if a quest progress bar or quest reward is getting delayed by 30ms.

I want non global GC heaps.

There are no comments on this comment yet.