paint-brush
An Introduction to the Crystal Programming Language by@dailydrip
6,479 reads
6,479 reads

An Introduction to the Crystal Programming Language

by DailyDripAugust 25th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

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.
featured image - 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.
  • 001.1 — Installation and Introduction to Crystal — Get ready to run your first simple program by learning how to install, write code and compile in Crystal.
  •  — We will play on Crystal’s playground, a convenient way to quickly learn the basic constructs, built-in types, its type system, and method overloading.
  •  — Let’s see how to define classes, modules and work with macros.
  •  — Build an HTTP server with Crystal in 5 minutes!
  •  — Extend your Crystal prowess by learning to handle JSON and access databases.
바카라사이트 바카라사이트 온라인바카라