DEV Community

Adebayo Abiodun Adeyemi
Adebayo Abiodun Adeyemi

Posted on

TYPES IN MOTOKO

Motoko is a programming language for building decentralized applications on the Internet Computer.
Motoko’s Type System
We explored primitive & non-primitive types, including:
✅ Bool → true or false
✅ Int & Nat → Numbers (bounded & unbounded)
✅ Char → Unicode-supported characters
✅ Text → A collection of Char (aka strings)

_Bounded vs. Unbounded Types
_

Bounded types: Have a fixed size (e.g., Int8, Int32).

Unbounded types: Can grow dynamically (Int, Nat).

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay