The language remains something of a niche one, but has significant potential…
The Crystal programming language was created to combine Ruby’s efficiency for running code with C’s efficiency for writing code. This new kid on the block is gaining considerable traction in the developer community.
What is Crystal?
Crystal is a programming language that is still under development which aims to provide a programming experience that is “Fast as C, slick as Ruby”.
The language’s official release dates back to 2014, however the language’s inception was in 2011 when QA and Dev Lead Ary Borenszweig from the Portuguese-based firm Manas Tech took on the challenge of creating a compiled Ruby-like language.
Today, Crystal has a growing community as evidenced in its 2017 ‘State of Crystal’ survey. The survey findings reveal that 19 percent of respondents been using the language for over 12 months, also demonstrating its early adoption and indicating it’s usage for non-trivial applications even during it’s infant stages.
The survey found that the language was primarily being used across microservices, CPU performance-intensive apps, CLI tools, Background workers,Big Data processing and as a Ruby replacement.
What Makes the Crystal Programming Language Unique?
Crystal and Ruby have something in common, they both look good. In relation to Crystal, it shares the readability and verbosity of Ruby but with the powers of a C-like language, namely static typing and lightning speed.
As Sam Johnson, the CTO of BlockVue Inc puts it in a Medium blog: “Until now, you always had the choice between writing a lot of hard-to-read, hard-to-debug, complicated, but extremely fast C/C++ code, and writing a short 5-liner in Ruby/Python that does what you want, but wastes memory and speed. In other words, we have always had to choose between performance and syntax.”
Additionally, the language contains support for Macros, allowing developers to write pre-processing functions that can be compiled at runtime.
Huge Surge in Popularity
According to it’s GitHub page, the language’s official repository has over 11 thousand stars. This growing community has high expectations for the language and its design philosophy. It will be interesting to see how the language is used to solve real-world problems as it continues to evolve and developer uptake and proficiency increases.