Motoko Programming Language (DFINITY)


The programming language for developing projects to run on the Internet Computer blockchain.

What Is Motoko Programming Language (DFINITY)?

Motoko is a new, general-purpose programming language built for the decentralized internet. It is designed to be secure and developer-friendly. Motoko will enable a new generation of decentralized applications to be built by teams of developers with diverse skill sets.

The Motoko language features powerful parity typing with provable security guarantees, enabling programmers to build complex systems without introducing exploitable vulnerabilities. It is also capable of implementing and composing smart contracts. Motoko’s design goals, type system, and execution model, and demonstrate its utility for building secure, scalable, and composable decentralized systems.

DFINITY is a new, public blockchain computer that will provide a decentralized cloud computing resource. It will be the first blockchain computer to support smart contracts based on the WebAssembly (WASM) virtual machine format, allowing developers to write secure, high-performance smart contracts in any programming language that complies with WASM.

DFINITY uses a new consensus protocol called Threshold Relay that is secure against 51% attacks and guarantees liveness, even in the presence of a minority of malicious actors. This makes DFINITY one of the few secure and scalable blockchains that can support smart contract functionality. In addition, DFINITY will offer an innovative new proof-of-stake-based randomness beacon that can be used in smart contracts to shuffle lists of data, generate random numbers, and select network participants at random.

DFINITY uses its own programming language called Motoko. Motoko is a modular functional programming language designed for building smart contracts on DFINITY's blockchain computer. It features:

  • Strong static typing with type inference.

  • Algebraic data types for pattern matching.

  • First-class functions with lexical closures.

  • High-level safety features such as automatic memory management, enforced immutability, and referential transparency.

Motoko provides a rich set of abstractions, data types, and concurrency primitives that allow developers to create sophisticated applications without having to deal with lower-level infrastructure concerns such as message passing, memory management, or garbage collection.

Motoko was developed as an exercise in language design to explore what a modern programming language would look like if it were able to take advantage of the Internet Computer's unique security model and decentralized architecture.

The Internet Computer is a public network of computers that has the potential to host and execute software at speeds and scales never before seen. It is an entirely new Internet, where developers can build unstoppable, fast, and secure software.
The Internet Computer is powered by the ICP coin, which is used to pay for computation on the network and governance of the system. 

The Internet Computer Protocol is a groundbreaking blockchain protocol that enables producers to run general-purpose software in a decentralized manner.