*** Welcome to piglix ***

Crystal (programming language)

Crystal
The Crystal programming language logo.svg
Paradigm Multi-paradigm: Object-oriented
Designed by Ary Borenszweig
Developer Manas Technology Solutions
Preview release
0.20.3 / December 23, 2016; 2 months ago (2016-12-23)
Typing discipline static
Implementation language Crystal
Platform 'IA-32' (i386), 'x86-64'
OS OS X, Linux, FreeBSD
License Apache License 2.0
Filename extensions .cr
Website crystal-lang.org
Influenced by
Ruby,C, Rust, Go,C#,Python

Crystal is a general-purpose, object-oriented programming language designed and developed by Ary Borenszweig and Juan Wajnerman and over one-hundred listed contributors. Crystal is developed as open source software (under the Apache License, Version 2.0) with syntax inspired by Ruby. The language is statically type-checked but does not require that the type of variables or method arguments be specified. This is the result of advanced global type inference. The language is in an active development phase.

Work on the language began in June 2011, with the purpose of creating a language which had the elegance and productivity of Ruby and the speed, efficiency and type safety of a compiled language. Initially called Joy, it was quickly renamed to Crystal.

In November 2013, the Crystal compiler (previously written in Ruby) became self-hosting. The first official version was released in June 2014. In July 2016 Crystal was added to the TIOBE Index.

Although resembling the Ruby programming language in syntax, Crystal compiles to much more efficient native code using an LLVM backend, at the cost of disallowing the dynamic aspects of Ruby. However, the advanced global type inference used by the Crystal compiler, combined with the usage of union types, give Crystal the feel of a higher-level scripting language than many other comparable programming languages. The language has automated garbage collection and currently offers a Boehm collector. Crystal possesses a macro system and supports generics and method and operator overloading. Crystal's concurrency model is inspired by communicating sequential processes (CSP), and implements light-weight fibers and channels (for communicating between fibers) inspired by the Go programming language.

This is the simplest way to write the Hello World program in Crystal:

Or using an object-oriented programming style:


...
Wikipedia

...