String
, Number
, Boolean
, etc.) but the type member allows a user to define their own custom type."hello"
is a String
. This information is used for syntax like "hello" is a string
. Most types allow a new object to be created, such as lists and maps.a-z0-9_
format, without any quotes or brackets.UpperCamelCase
but this is only a style choice to prevent confusion with functions.[a] new %Type%
function(...) from %Object%
syntax.print {thing}
will not look very nice. Special string conversion behaviour can be added using a special toString
function.toString
function is overriding the built-in Object
type's toString
method, and allowing the user to control what it prints.return: String
is necessary to make sure the compiler knows exactly which function to override.<property> of %Object%
syntax.