Skip to content
Mochaccino
  • Pages
    • Introducing Mochaccino
    • Installation and Onboarding
    • Principles
    • Mochaccino Tools
    • Configuration File
    • Packages
    • Modules
    • Structs
    • icon picker
      Variables
    • Functions
    • Statements
    • Math
    • Debugging
    • Comments
    • Style Guide
    • Reference
Share
Explore

Variables

Static Typing

Built-In Types

The default types in Mochaccino are:
string
int
double
bool
map<K, V>
array<E>
void
promise<V>
null
Note
Actually, there’s another default type in Mochaccino, <EntryPoint>, which is used by the module containing the main function. However, this type is considered an exception, and the term “default types” excludes this type.
The default types are written in lowercase, while custom types are written in CamelCase.

Nullability

Mochaccino doesn’t support null types, because the null value can be used with any type. A variable can be either null, or holding data.
 
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.