Update 'Blind Type Definitions'
parent
cfb6df4c88
commit
e84e10b439
@ -1,7 +1,17 @@
|
|||||||
|
# Syntax
|
||||||
|
|
||||||
```
|
```
|
||||||
type ro Pixel:U32
|
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
|
"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
|
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
|
primitive types, pointers, and arrays. This can be useful for adding extra
|
||||||
|
Reference in New Issue
Block a user