Sign up for our newsletter - Navigating the horizon of business technology​
Technology / Software

Crystal – The New Programming Language on the Block

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.

White papers from our partners

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.”

See also: Why Programming Language “Rust” is Getting all the Love

Additionally, the language contains support for Macros, allowing developers to write pre-processing functions that can be compiled at runtime.

Finally, Crystals dependency management system, named appropriately ‘Shards’ is the language’s equivalent to JavaScript’s NPM or Ruby Gems. Ultimately this combination of useful features from two of the world’s most popular languages may make Crystal a unique programming language amongst its peers as it continues to grow.

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.

This article is from the CBROnline archive: some formatting and images may not be present.

CBR Staff Writer

CBR Online legacy content.