Crystal is a general-purpose, object-oriented programming language designed and developed by Ary Borenszweig and Juan Wajnerman. Crystal is developed as open source and its syntax is inspired by Ruby. Crystal is statically type-checked but without having to specify the type of variables or method arguments. Its first official release was released in June 2014.[1][2] While the original Crystal compiler was written in Ruby, in 2013 a new compiler written using the Crystal programming language itself was released. [3]
Examples
This is the simplest way to write the Hello World program in Crystal:
puts "Hello World!"
Or using object-oriented programming:
class Greeter
def initialize(name)
@name = name.capitalize
end
def salute
puts "Hello #{@name}!"
end
end
g = Greeter.new("world")
g.salute
References
External links