Literals
Literally!
Small ML Language supports a wide variety of value literals, these are the most basic ones. Complex literals will be introduced later in relevant sections.
Numbers
SMLL supports two kinds of numbers, integers and float literals. They follow the standard form for numbers which is used everywhere. Numbers have a type associated with them, see below:
Characters
SMLL also supports the character type, also known as char or u8 in other programming languages. As in Java, a character literal is a Unicode-16 char literal.
Strings
SMLL supports java strings by default and they are multiline, by default. Strings below to the String type.
Unit
SMLL also supports the unit literal, inspired by the rust programming language. Unit literals are analogous to void in java, the difference is that they are a value that doesn't represent data. They can be used in place of returning nothing as in void.
Last updated