
If You Love Ruby But Need More Speed: Elixir vs Crystal
If you write Ruby code, you already know why it is so popular. It is incredibly easy to read, and frameworks like Ruby on Rails make building web apps very fast. But eventually, every Ruby developer hits a wall. Maybe your app needs to handle thousands of live websocket connections (like a chat app), and Ruby starts eating all your server's RAM. Or maybe you have a script that processes millions of rows of data, and it is just too slow. When this happens, Ruby developers usually look at two alternative languages that share a very similar syntax: Elixir and Crystal . Here is a simple breakdown of how they compare, and when you should actually use them. 1. Ruby: The Comfortable Default We all know Ruby. It is purely Object-Oriented. Everything is an object, and the main goal of the language is "Developer Happiness". # ruby def greet ( name ) "Hello, #{ name . capitalize } !" end puts greet ( "zil" ) The Good: Huge ecosystem (Gems). If you need to connect to a weird API, there is already
Continue reading on Dev.to Webdev
Opens in a new tab




