Hacker News new | ask | show | jobs
by steveklabnik 2456 days ago
One significant difference is that Zig has no GC, whereas Crystal and Nim both do.
1 comments

I don't know about Crystal but Nim GC is optional and even on a per-type basis:

Use plain object and you are on the stack Use ptr object and you can use any allocator you want (Nim's default, malloc/free or jemalloc, mimalloc, ...) Use ref object and your reference will be managed by the GC.

In terms of GC, you the default is deferred reference counting (no ref counting if object is created and destroyed at the end of the scope). It accepts real-time and max-pause tunings parameters, to allow it to stay beyond those 60FPS / 144 FPS requirements

You can also choose java-like mark-and-sweep, the Boehm GC, the go GC, or no GC and get a warning everytime you try to use a type that uses the GC.