Page:
Blind Type Definitions
Pages
Arguments
Blind Type Definitions
Body
Control Flow
Data
Enum Type Definitions
File Structure
Functions and Methods
General Syntax
Guidelines
Home
Identifiers
Initialization
Interface Definitions
Metadata
Modules
Object Type Definitions
Permissions
Phrases
Return Direction
Tokens
Variable Definition and Type Notation
Clone
3
Blind Type Definitions
Sasha Koshka edited this page 2022-08-24 16:29:37 +00:00
Syntax
type ro Basic:Int
type ro BasicInit:Int 6
type ro IntArrayInit:{Int 3}
3298 923 92
Blind typedefs are very simple. They are composed of the inherited type, and an optional default value.
Semantics
"Blind" type definitions are called that because they cannot do fancy things like define new members on the type they inherit, but they can inherit from primitive types, pointers, and arrays. This can be useful for adding extra semantics to code, and for defining methods on things that don't need to be a whole object.