The Crystal Programming Language Forum

From ruby to crystal, any cons?

Hi there, I’m considering to migrate from ruby (rails) to crystal (amber), but the discusion is more tied to crystal than a framework, what are the cons right now at a language level? There’s anything I need to be worried about about some stuff that ruby currently has and crystal is missing? I’m not so concerned about missing libraries right now because that can be solve quite easily.

A bit offtopic, but my concerns to migrate from ruby to amber are that I’ve been working with strong typed languages the pasts years and now coming back to ruby I feel that I lost some of the nice features of strong typed languages (errors at compile time, instead at runtime), I currently facing that some changes made right now you cannot check instantly what impact has in your app, and more when you work in a medium/large team, I know that you may can work on test but for me seems that test for some scenarios are waste of time, while having crystal the errors will instantly popup (as far I read in some articles related to amber).


You can check [Mini Review] Giving up on Crystal for some cons.
Exact problems mentioned there are debatable, but the points in general are (imho) truthy.

  • Type system. Background with strongly typed languages will help, but there still will be times when you are fighting against type system.
  • The rest of mentioned there points. IDE aren’t clever, compile times could be several seconds, i can’t agree with documentation (IMHO it’s awesome) but maybe I was just lucky, breaking changes occurs, future is uncertain.

For me the only issue I see right now is the version breaking changes, about the compile times, type system, etc I’m not concerned too much, I’ve been playing with rust for few months and I’m kinda used to thing about the types etc, also I fall in love in having static typed, even that I don’t want to write javascript anymore (but sadly I’m not a lover of transpiling too much so Typescript is also discarted for the front end, I just stick with js but that’s another topic).

Well for the time being I will just toy with crystal and put on hold to use it on real projects.


1 Like

Maybe you can try it with a small service and see how it goes.

I have not used amber yet, so I can’t say anything about that end of things.

About Crystal itself, I would suggest just doing it. I’m very much in love with the type system it provides and the great standard library.

Using crystal also removes the problem of installing and maintaining a ruby installation on the live system, which I always hated.
It is so much simpler if I can just do dpkg-buildpackage on my laptop and apt install the new version on a system without messing about with RVM or RBENV.

One of the few serious blockers I’ve found, was a really limited way of mocking things in specs.