Types
Boson will have base types common to many languages.
Integer types
The integer types in Boson will be the following:
Type | Signed | Size |
---|---|---|
int |
✓ | >= 32 bits |
uint |
>= 32 bits | |
int8 |
✓ | 8 bits |
uint8 |
8 bits | |
int16 |
✓ | 16 bits |
uint16 |
16 bits | |
int32 |
✓ | 32 bits |
uint32 |
32 bits | |
int64 |
✓ | 64 bits |
uint64 |
64 bits | |
intm |
✓ | machine word size |
uintm |
machine word size | |
isize |
big enough to contain the size of any object |
Note: intm
, uintm
, and isize
may disappear. They may all be unified into uintptr
Float types
float32
float64
- What they sound like. These will probably be implemented much much later.
Bool
bool
will be a boolean type with two possible values: true
and false
String
string
will be the basic string type.
Struct
Boson will allow the creation of compound types using struct
:
type Compound struct {
foo int
bar bool
baz string
}
ADT
Boson will allow the creation of Abstract Data Types
type Option[T] {
Some(T)
None
}
Interfaces
Not designed yet.