An Introduction to the Crystal Programming Language by@dailydrip

An Introduction to the Crystal Programming Language

DailyDrip HackerNoon profile picture



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.