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.
- 001.2 — Crystal Language Basics — 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.
- 001.3 — Language Basics II — Let’s see how to define classes, modules and work with macros.
- 001.4 — Web Server — Build an HTTP server with Crystal in 5 minutes!
- 001.5 — JSON and Databases — Extend your Crystal prowess by learning to handle JSON and access databases.
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.
Copyright 2017 NETWORKFIGHTS.COM