4 ms·
> Have you taken a look at Crystal? A bunch of times. > What is your impression of Crystal? Still not as nice as Ruby, but pretty slick and OK. Seems less
by Mikeb85 5y ago
> Have you taken a look at Crystal?
A bunch of times.
> What is your impression of Crystal?
Still not as nice as Ruby, but pretty slick and OK. Seems less mature and less useful than something like Nim, despite the similarities with Ruby.
> Are there any features that would make you use the language? (Or reasons for not using Crystal?)
Back in the day, the lack of any decent support for parallelism. It seems they do have a strategy for it now which seems ok. But on a whole, Ruby is fast enough for my needs and Crystal still isn't as easy to use.
Edit - so just translated one of the benchmarks I use to test programming languages (economics benchmark, basically creates a bunch of arrays, performs a bunch of operations on them, compares them, etc..., that sort of thing - so lots of maths and looping) and Crystal is now slightly quicker than Nim although it produces an erroneous result so I'm curious about it's float64 implementation. Or maybe I got some syntax wrong going from Ruby -> Crystal.
Also, if anyone's curious, times on the benchmark I used (and everything is written in naive code, except Python which uses Numpy data structures so presumably some optimisation there?)
C++: 1.05 seconds
Crystal: 1.3 seconds (but wrong result, for now)
Nim: 1.4 seconds
Ruby --yjit: 35 seconds
Ruby --jit (mjit): 40 seconds
Python3 (using numpy): 100 seconds
Ruby no jit: 120 seconds