As far as I've seen, Crystal's only merit seems to be is that it's more or less Ruby but statically typed and compiled. In the interest of shedding my ignorance maybe someone can tell me why it's worth trying? From my observation it's features don't seem that differentiated from other modern languages like Rust or Zig.
>it's features don't seem that differentiated from other modern languages like Rust or Zig.
I think Crystal is going more for the space of Go. Compiled language that is performant without manually dealing with memory or the borrow checker. As someone who is disappointed with Go, I would love for a language (Nim or Crystal seem best positioned) to fill this niche.
The type system is so strict that if it compiles it will almost always run. Nil is a type that must be explicitly ruled out before you can use a potentially nilable value.
But it avoids the manual memory management/borrow checking/pointer vs. reference vs. value unpleasantness of Zig/Rust/C++.
It's probably most comparable to Java/C#, but something about the design of the syntax and standard library makes it much more appealing than either of those for me.
Really, what modern language has any real unique features? Rust has an actual unique feature (borrow checking). Other than that, they just pick slightly different subsets of what has been around since 1970.
That being said, Ruby for me always felt like the syntactic ideal.
[1,2,3].map { |i| i + 2 }
The combination of data structure literals, trailing closures (blocks), expressions by default, dropping parens - it is ideal for me. That’s subjective, so, no point in discussing that, I can’t be swayed.
But, what I always hated about working on large Ruby apps was a lack of types and concurrency. Add those on, and that’s a language that I would really enjoy.
That’s what it brings to the table. When people like Ruby, it’s because the syntax can be legitimately pleasurable to work with. Not true of any other language. Add on the more industrial aspects like static types, concurrency, and performance, and you have a compelling language. If that doesn’t seem interesting to you, that’s because it’s not for you.