Introduced enumerations and explicit built-in value types with strong typing.
Enumerations are introduced as a set of named values. Enumerations are values and processed as a type.
Four built-in value types (with corresponding literals) are now defined in Paml: string, number, bool and enumeration. Literals are marked by styling.
Possible feature in Paml could be custom literals, that's for a value a literal syntax can be defined, and such literal will be processed by Paml translator as an instance of the value.
Paml is now a strong typing language: no unknown types are possible in a correct solution. As result, no need for obj/val keywords but kept for a while.
enumeration
{
Normal, High, Low
}
{
val v1 = This is a text.;
val v2 = false;
val π = 3.14159;
val v4 = Alonzo.Polo.ThreadPriority.Normal;
}
Write a comment