Language

Types

Every binding announces its type on the define line. Alana likes introductions.

TypeMeaningLiteral
numInteger. Whole, unbothered.25
decimalA number with a dot, for drama12.5
strString. Words in double quotes."Hello"
scharOne character. One. I mean it.'A'
booleantrue or false. No “maybe”.true
anyAny type. When you refuse to commit.true · "Hello" · 23
[]An array of a type[10, 20]

Array types

Element type, then brackets. num[], str[], decimal[]. A little queue of values, waiting their turn.

define num[] numbers is [10, 20, 30];
define str[] names is ["Ahsoka", "Yoda", "Kenobi"];
define num[] history is [];

Literals

  • Strings wear double quotes.
  • Characters wear single quotes. They are smaller. They know.
  • Decimals use a dot: 3.3, 50.0.

Class types

A class name is a type too. define Person jacob is newobj Person("Jacob", 21); — the wardrobe grew. Details live under classes.

Conversion

You do not cast by shouting a type name at a value. You ask nicely via type parsing (parsenum, tryparsenum, and their sisters).