News for hackers. Stuff that matters.

costajob

Re:Crystal: Fast as C, Slick as Ruby on Friday August 05, 2016 @04:22AM (#12230777)
Stick with Ruby then: Rails is great to build monolith application easily, Crystal suits a different use (micorservices?). Also the lack of Ruby meta-programming facilities (send overall) will make to rewrite Rails with Crystal really challenging (pointless?)
Re:Crystal: Fast as C, Slick as Ruby on Friday August 05, 2016 @03:59AM (#12230705)
Apart for different syntax:

Plus of NIM:

* powerful compiler can produce C, C++, JS, ObjectiveC code

* GC can be completely removed to adapt to the program

* support parallelism via threading

Plus of Crystal:

* use of types union permit to mix types in almost every data structure, let you pondering if the langugae is really strong typed

* so similar to Ruby that porting a 100-lines library (with no fancy-metaprogramming) to Crystal is often a matter of few hours

* use of green threads suits very nicely with HTTP request/response cycle (like GO and Erlang), where using threads/processes is more memory/CPU consuming

What Crystal still lacks is parallelism, but core team are working on that.

Said that both are modern, fast, elegant languages, with a good standard library and a vibrant community.