It's easy to write, and comparable in performance to Go and similar.
Rust, Zig, and Nim are solving different problems.
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...
That being said, I'll grant that the distinction between "tiny runtime" and "no runtime" isn't useful and that C can be said to have a runtime insofar as most systems provide a `crt0` or equivalent.
Tmk Crystal still lacks Windows support as well and probably other os's / archs's compared to Nim
https://crystal-lang.org/reference/1.4/syntax_and_semantics/...
Of course, same as Nim, you lose access to most of the stdlib.
Nim is very close to Crystal. Some parts that might lead you to prefer Crystal however:
- Nim compiles to C code, meaning Nim is coupled to what C can do. I find compiling to C to be distasteful, C is not meant to be a compilation target. We should be getting away from C, IMO. Nim is limited to what C can achieve, and the design of the language trends towards "here's how this translates to C" as a result. Compiling to C is also an extra layer of abstraction, as now for instance with debugging you have to go through the C layer. Crystal like Rust uses LLVM
- Crystal also uses Ruby syntax, which many prefer. I have grown to dislike semantic whitespace such as how Python works, so this is a plus for me.
- Crystal has a garbage collector, period, and leans into that. Whereas Rust, Zig, and Nim want to give you complete control over memory, Crystal is more focused on being a better high-level programming language, competing with the likes of JVM/NET/Go/Ruby. This focus is likely Crystal's main edge. The only other single-executable opinionated GCed language is Go. Crystal's type system is much better than Go's. If Crystal can reduce compile times and capture some of Go's pragmatic aura, it will see more success.
In some applications memory allocation is not that important, so it's nice not having to think about it at all.
I've gone deep into Rust recently, but Crystal might still eat Python's lunch, a language I've fallen out of love with.