|
|
|
|
|
by MercurialBlue
1518 days ago
|
|
May I ask what exactly do you dislikes about Nim's garbage collection? You said you "quickly" scanned Nim's page, so I assume you just don't want a GC period? If you're dealing with hard-realtime constraints then I understand. But otherwise, as long as you aren't dealing with cyclic data structures, Nim's GC is just reference counting, which is very widespread in even C++ and Rust code, and if you really want to you can just not use the cycle collector and break the cycles yourself. The way I see it, the GC is just nice to have for productivity, and for those cases where you really need to optimize your program, there is nothing stopping you from managing your memory yourself, you can write your own types with their own constructors/destructors (Nim has "scope-based" memory management akin to RAII in C++), of course, you must be aware that using pointers will lead to potentially unsafe code, Nim can't hold your hand there. |
|