News for hackers. Stuff that matters.
Re:The Odin Programming Language by Cyph0n on Friday January 31, 2020 @09:00PM (#22208024)
That’s great, but can you use the Nim stdlib with no GC?
Re:The Odin Programming Language by beagle3 on Saturday February 01, 2020 @03:52AM (#22209511)
Yes, with some relatively minor caveats, mostly having to release memory yourself.

Also, the arc/orc GC is shaping up and already allows you to use exclusively reference counted memory management - so, efficient and perfectly deterministic timing but still get automatic memory management. (As usual, if you introduce cycles, it becomes more complicated)

And the Nim compiler elides many ref/unref ops, as well as keeping objects thread-local, so most performance objections to ref counting don’t actually apply. (.... and you have a choice of other automatic GC modes, including “none”)

Re:The Odin Programming Language by Cyph0n on Saturday February 01, 2020 @12:46PM (#22211854)
Good to know. Thanks for the explanation.
Re:The Odin Programming Language by shakna on Saturday February 01, 2020 @03:31AM (#22209453)
Yes, but you'll need to call dealloc [0] on the result of any call, unless you want to leak memory.

[0] https://nim-lang.org/docs/system.html#dealloc%2Cpointer