Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Select Page

Crystal for Rubyists

Crystal for Rubyists

In this book, we’ll talk about why you should care about Crystal, how to get up and running, the basics of writing software in Crystal, and maybe even something like building a Ruby gem with Crystal.

NOTE: While this book is called ‘Crystal for Rubyists,’ it should be accessible to anyone who knows about OOP and programming in a dynamically typed language. Analogies will be made that will make the most sense to Rubyists, but you can still get a lot out of this book if you are a programmer of a different sort. If your favorite language is static, then you’re already ahead of the game. You can just disregard a lot of the analogies.

You already write software in Ruby. It pays your bills. You enjoy it. Why should you care about Crystal?

Let’s think about Ruby for a minute: what’s its biggest weakness?

  • Concurrency
  • Speed
  • Documentation

What’s awesome about Ruby?

  • Blocks
  • Vaguely functional
  • Syntax is pretty easy
  • Focus on developer happiness
  • Get up and running quickly
  • Dynamically typed

So we could learn a lot from a language that’s easy as Ruby, handles concurrency well, and is fast. We don’t want to sacrifice anonymous functions, pretty syntax, or not making ‘AbstractFactoryFactoryImpls’ just to get work done.

That language is Crystal.

Now, Crystal is not perfect. It is getting better. But the point is to learn. and using a language that’s very familiar, yet very different, can teach us a lot.

Crystal for Rubyists

by Serdar Dogruyol (PDF, MOBI, EPUB, Online reading) – 10 Chapters

The Only Option - Win More Client Work than You Need, by Being Indispensable by Alex Mathers