An Introduction to the Crystal Programming Language

Spread the love
Crystal’s syntax is heavily Ruby-inspired, and it comes with this amazing built-in playground.

Crystal was born five years ago, as a challenge to a long-held assumption: that a programming language can either be easy to understand by humans or compile to fast programs.

Crystal is a statically-typed, compiled language, that achieves performance close to c/c++ while having a syntax as readable as Ruby. It relies on LLVM for emitting native code, thus making use of all the optimisations built into the toolchain. Thanks to its type checking system, type errors are caught during compilation, avoiding errors on runtime. But, given it has built-in type inference, most type annotations are unnecessary, keeping the code cleaner and easier to read.

Many other features make it a powerful yet easy-to-use language: null reference checks, a macro system and C-bindings. With a community constantly increasing (more than 8.8k followers on GitHub), Crystal is one of the fastest growing modern languages.

Here’s a quick intro to Crystal that will get you started in less than 30 minutes.


An Introduction to the Crystal Programming Language was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.

Click here for reuse options!
Copyright 2017 NETWORKFIGHTS.COM