2.3 Composites
Composites make it easier to create larger smart contracts, as they contain multiple types.
In BigBang, the type system does not allow for empty values, meaning that a boolean is always either true or false, and an integer always contains a number. However, optionals can be used to express a variable that could have a value or nothing. The optional type can have a value of the wrapped type or be empty. To utilize the optional type, wrap a different type with it. The optional type can have a value of the wrapped type or be empty. The optional type can have a value of the wrapped type or be empty. It is a powerful tool, but it must be handled properly in the code. Here are a few examples.
Last updated