Skip to main content

Language specification

This chapter covers the following topics:

Syntax

Type system

  • Data types
    • primitive types: byte, pair, int, bool
    • type aliases using type
    • function pointers
  • Arrays: static versus dynamic arrays, guidance for resizing arrays
  • Generics: defining and using parameterized types

Execution model

  • Expressions: literal values, operators, Euclidean division, function-like operators such as to_byte(x)
  • Statements: assignment, function call, return, loop/drop/lift, if, the debugger break statement
  • Variables: local variables, func parameters, module members, class members, view var
  • Functions: module functions, class functions, assembly functions (chombit and intrinsic)

Program structure

Memory management