The Crystal Programming Language

Published on 22 April 2018 (Updated: 15 May 2023)

Welcome to the Crystal page! Here, you'll find a description of the language as well as a list of sample programs in that language.

This article was written by:


Like Julia, Crystal is another open-source language with a nice Wikipedia page, so we'll be using that to get some language background.

According to Wikipedia, Crystal is a general-purpose language that first appeared in 2014. As of today, Crystal is self-hosted meaning the compiler is written in an earlier version of Crystal.

That said, Crystal was inspired by Ruby which is the language Crystal was originally written in. However, as previously mentioned, Crystal is a compiled language, so many of the dynamic features of Ruby no longer exist.

Despite the lack of dynamic features, Crystal leverages strong type inference to allow for implicit typing. As a result, the language looks like a high-level scripting language. However, the language's efficiency is much closer to lower-level languages like C.