Few questions regarding Crystal

Hi I am checking out this language but I have a few questions regarding this language.

  1. Does it use a GC or reference counting by default or something that can cause overhead during runtime execution of the program?
  2. Is it a compiled language?
  3. Is this a typical programming language used to develop applications or is it for for web development and can be used as a replacement of the Ruby programming language?
  4. Is this language easier to use over languages such as C, C++ and Rust?
  5. Is this language well suited for artificial intelligence like Python?
  6. Is this a stable language?
  7. Can this language be used for system’s programming?
  1. Yes, it uses a GC. There’s also a minimal runtime for fiber management, but it’s extremely optimized.
  2. Yes, like Rust, C or Go for example.
  3. It’s a general purpose language. I wouldn’t say it can be used a replacement of Ruby, but it’s usable anywhere Ruby is (except maybe for apps that depend heavily on Ruby’s runtime “malleability”.
  4. That’s a bit subjective and it depends on your background and needs. Having a GC, it frees the programmer from having to think too much about memory management, but that also means it takes that power away. So it’s easier if you’re in a context where you can afford to delegate that responsibility to a GC. Being a bit of a Ruby derivative, it’s generally easy for rubyists to pick it up rather quickly.
  5. I think Crystal is technically very well suited for AI work. The main downside when comparing to Python is that Python has been used in that context since before Crystal even existed. That means Python has a myriad mature libs and tools focused on that, as well as a huge community and a high percentage of the academy using it. The network effect makes it very hard to contest.
  6. I’d say so. 1.0 is around the corner, and the last 5 or 6 versions broke compatibility of very minor things, always providing easy upgrade guidance.
  7. This is hard to answer, I’d say no. I think GC languages are not the best tool for the job of system programming. That said, there’s been somewhat successful attempts to write kernels in Crystal, but AFAIK they were experiments rather than serious attempts at working products.
6 Likes