Literals
The most fundamental of any language are its literals. Cheddar provides the 4 most basic literals:
  • Strings
  • Numbers
  • Booleans
  • Arrays
Additionally Cheddar has functions, interfaces, and more primitives. Classes will be covered in their very own section

Strings

Strings in Cheddar are like most programming languages:
1
"Hello, World!"
2
'Hello, World!'
3
"2 + 2 = #{2+2}"
4
'10 + 10 = #{10+10}'
Copied!

Numbers

Numbers have many features in Cheddar to make them readable and clear:
1
123
2
123.456
3
123_456
4
0b123
Copied!

Arrays

Arrays in Cheddar are like most other languages:
1
[1,2,3]
2
["foo", "bar", "baz"]
Copied!

Booleans

Booleans are either:
1
true
2
false
Copied!
Last modified 1yr ago