Skip to content

Types

Bebop has builtin support for the following data types:

NameDescription
boolA Boolean value, true or false.
byteAn unsigned 8-bit integer. uint8 is an alias.
uint16An unsigned 16-bit integer.
int16A signed 16-bit integer.
uint32An unsigned 32-bit integer.
int32A signed 32-bit integer.
uint64An unsigned 64-bit integer.
int64A signed 64-bit integer.
float32A 32-bit IEEE single-precision floating point number.
float64A 64-bit IEEE double-precision floating point number.
stringA length-prefixed UTF-8-encoded string.
guidA GUID.
dateA UTC date / timestamp.
T[]A length-prefixed array of T values. array[T] is an alias.
map[T1, T2]A map, as a length-prefixed array of (T1, T2) association pairs.

You may also use user-defined types (enums and other records) as field types.

A string is stored as a length-prefixed array of bytes. All length-prefixes are 32-bit unsigned integers, which means the maximum number of bytes in a string, or entries in an array or map, is about 4 billion (2^32).

A guid is stored as 16 bytes, in Guid.ToByteArray order.

A date is stored as a 64-bit integer amount of “ticks” since 00:00:00 UTC on January 1 of year 1 A.D. in the Gregorian calendar, where a “tick” is 100 nanoseconds.