4 ms·
It has a garbage collector by default, though it can be disabled (--gc:none) and then you can manage memory manually. In the future, Nim's default memory manag
by michaelsbradley 5y ago
It has a garbage collector by default, though it can be disabled (--gc:none) and then you can manage memory manually.
In the future, Nim's default memory management will use reference counting with destructors and move semantics inspired by Rust and C++.
https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc...
https://nim-lang.org/docs/destructors.html https://nim-lang.org/docs/destructors.html
https://nim-lang.org/docs/nimc.html https://nim-lang.org/docs/nimc.html
- staticassertion 5y agoThis is really cool. I really want a language that has GC, but lets me be explicit about memory usage as well / leverage move semantics to optimize. I use Rust, and I suspect I'll always have it as a driver, but I wouldn't mind another higher level language to take the place of Python, which I use for prototyping.