1 Type Definitions
Sasha Koshka edited this page 2022-09-19 04:38:18 +00:00

Syntax

type ro Name:Int

type ro Name:Int:<6>

type ro Name:{Int ..}

type ro Name:Obj:(
	.ro that:Int
	.ro this:Int)

type ro Name:Obj:(
	.ro that:Int & 1
	.ro this:Int:<298> & 24)

type ro Name:Obj:(
	.ro that:String:<"hello world">
	.ro this:Int:<23>)

type ro Name:aBasic:(
	.that:<9384>
	.this:<389>)

type ro Name:aBasic:(
	.this:<389>
	.ro these:aBasic:(
		.ro born:Int:<4>
		.ro in:Int
		.ro the:Int:3:<9348 92384 92834>
		.this:<98>)
	.that:<9384>)

Typedefs are very simple. They are composed of the inherited type, and an optional default value.

Semantics

A type section assigns a name to a type specifier, and gives it module scope. The type definition's name can be used in a type specifier. For example, if a type were to be defined called Bird, a new variable of that type could be defined with the syntax varName:Bird.