top | item 32685635

(no title)

db65edfc7996 | 3 years ago

Nim and Crystal feel like they are in exactly the same space? GC, fast, single executable compilation without runtime (I would also throw Go into this list).

discuss

order

cultofmetatron|3 years ago

there is a runtime. its just baked into the final executable. you can't have garbage collection without one.

auxym|3 years ago

Nim's new ARC gc, which will be default soon-ish in 2.0, does not have a "runtime" as commonly understood.

It is fully deterministic, so it simply injects alloc/free calls in the generated code at compile time. It even has an option that can show you where the calls are injected.

https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc...

yxhuvud|3 years ago

Everything has a runtime nowadays. Even C, even if it isn't all that large (including for example the memory structures necessary to keep malloc and free working).

heynowheynow|3 years ago

Pony does stricter sharing semantics than Rust (multicore) with actors and allegedly one of the fastest GCs ever developed. Its community is even smaller than Crystal's. Pony was developed essentially as a PoC to demonstrate the GC.

hahaitsfunny|3 years ago

You can ditch Nims GC and runtime and bring your own if you want. Of course you'd lose access to most of the stdlib but this is why Nim can be used and is popular for embedded / bare metal.

Tmk Crystal still lacks Windows support as well and probably other os's / archs's compared to Nim