About this guide
This is a formal specification of the Crystal language.
You can read this document from top to bottom, but it’s advisable to jump through sections because some concepts are interrelated and can’t be explained in isolation.
The Language Introduction tutorial offers a more focused learning experience for beginners.
In code examples, a comment starting with # =>
shows the value of an expression.
1 + 2 # => 3
A comment starting with # :
shows the type of an expression.
"hello" # : String
To the extent possible under law, the persons who contributed to this workhave waived
all copyright and related or neighboring rights to this workby associating CC0 with it.
https://crystal-lang.org/reference/syntax_and_semantics/index.html