Skip to main content
The Fift stack can contain values of the following types: The first seven types listed above are shared with TVM. Others are Fift-specific.

No boolean type

There is no dedicated Boolean type. Instead, booleans are represented as integers:
  • “false” is 0, “true” is -1, a 257-bit integer with all bits set to 1.
  • Logical operations are performed using bitwise operations.
  • In conditional execution of blocks and loops with exit conditions, any nonzero integer in the conditions is regarded as “true”.

Tuples

Tuples can be used to represent values of arbitrary algebraic data types and Lisp-style lists. Refer to the Tuples section in the basic values page.

Object type

Many entities in Fift do not have a dedicated type, but they are assigned type Object. Fift provides words for creating and manipulating these entities. Examples of entities of type Object:
  • Word list: A partially created list of word references, used for creating an execution token. See section for blocks in the control flow page. See also Section 4.7 in the whitepaper for a list of words that create and manipulate word lists.
  • Execution token: Fift code that can be executed and manipulated on the Fift stack. See section for blocks in the control flow page for more details.
  • Fift hashmap: A hashmap specific for Fift. These hashmaps are not represented as cells, contrary to TVM hashmaps. As a comparison with TVM hashmaps, refer to Section 6.3 in the whitepaper for a list of words that create and manipulate TVM hashmaps.