DEV Community

Discussion on: We created the Crystal language, ask us anything!

megatux profile image
Cristian Molina

What language/s do you consider the one to beat?
What language do you consider the most similar to Crystal?

Do you consider the current GC algorithm good enough for v.1.0 ?

Do you consider web dev as the bigger use case or do you have other scenarios like native app-dev, games, IoT, etc as main use cases?

sdogruyol profile image
Serdar Dogruyol

I've some high scale APIs running for more than 1 year without any restarts and there's no memory leak at all. I can easily say that the current GC (Boehm GC) is pretty good enough.

asterite profile image
Ary Borenszweig

Excellent questions!

I don't think we want to beat other languages. We actually use other languages and love them all, like Ruby, Elixir and Go. With Crystal we try to provide an alternative that's fun to work with and performant when possible, but that of course depends on everyone's preferences (some like Ruby's syntax, others don't). We actually encourage others to combine Crystal with other languages.

It's hard to find other languages that are similar to Crystal. I'd say the syntax is very close to Ruby, the runtime maybe a mix of Ruby and Go (but just a bit), and since we have value types we are maybe similar to C#, D and Swift. And we have multiple dispatch, which Julia also has, so there's a similarity too. We use LLVM as a backend, which Rust and Julia do too. As you can see, we get inspiration from many, many languages.

I think the GC algorithm might be good enough for v1.0. Versions past 1.0 will be all about improving the performance and fixing potential bugs, while retaining backwards compatibility. For example Go improves their GC each time in every version, so maybe the one in 1.0 wasn't that good (if you compare it to the current one ;-)).

I'd personally love to see Crystal being used in other contexts than web apps. For example I'm a big fan of videogames, I play them every day, and I'm super happy when I see others creating games in Crystal (BlaXpirit is probably the one leading this effort).

mverzilli profile image
Martin Verzilli Ask Me Anything

Manas.Tech is full of language geeks, and as such we don't like to frame Crystal's growth in terms of beating X language. We prefer to take inspiration from them, and think there's room in the world for everyone. Do The Beatles beat The Rolling Stones or vice-versa? I don't want to pick, I want to listen to them both!

Crystal will be appropriate in some contexts, and its syntax and philosophy might resonate better with you than other languages in those cases, then you'll use it.

As far as similarities go, I see it being most comparable to Go, Ruby, Python in different aspects or contexts.

The current GC is out of the box, and does a surprisingly good job for now. We might need to tweak it or write one from scratch if we stumble upon any limitations while getting to support parallelism; we still don't know.