Jump to content

Draft:Move (language)

From Wikipedia, the free encyclopedia

Move
Typing discipline
Implementation languageRust
LicenseApache 2.0
Filename extensions.move
Websitegithub.com/move-language/move
Influenced by

Move is a programming language for writing safe smart contracts.

Syntax and features[edit]

Move's syntax is similar to Rust

Hello World program[edit]

Below is a "Hello, World!" program in Move. The fn keyword denotes a function, and the println! macro prints the message to standard output.[1] Statements in Move are separated by semicolons.

fn main() {
    println!("Hello, World!");
}

Bytecode interpreter[edit]

Move bytecode instructions are executed by a stack-based interpreter similar to the Common Language Runtime (CLR) and Java Virtual Machine (JVM). An instruction consumes operands from the stack and pushes results onto the stack. Instructions may also move and copy values to/from the local variables of the current procedure (including formal parameters[2]

Adoption[edit]

Move and its virtual machine are powering multiple blockchains, most of which are still in the early development phase.[3][4]

  • Sui - A next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language (in devnet).
  • 0L - A reference implementation of a neutral replicated state machine. Forked from the Libra/Diem technologies (in mainnet).
  • Starcoin - A smart contract blockchain network that scales by layering (in mainnet).
  • Aptos - Aptos-core strives towards being the safest and most scalable layer one blockchain solution (in mainnet).
  • Pontem - Substrate-based parachain with MoveVM onboard (in testnet).
  • Celo - Blockchain with EVM and MoveVM (coming soon).
  • Diem - The original Move-based blockchain from Meta (form. Libra by Facebook) (discontinued).
  • ChainX - Bitcoin's layer2 smart contract network has already supported WebAssembly and EVM, and is supporting MoveVM (in mainnet).

Books[edit]

  • Move Book - Move book maintained by the Move core team.
  • Move Book - Move book maintained by damirka.
  • Move Patterns - A book on Move software design patterns maintained by villesundell.
  • Sui Move by Example - A book on the Sui Move variant maintained by MystenLabs.

See also[edit]

References[edit]

  1. ^ Klabnik & Nichols 2019, pp. 5–6.
  2. ^ Blackshear, Sam; Cheng, Evan; Dill, David L.; et al. "Move: A Language With Programmable Resources" (PDF). pp. 1–26. Retrieved 2024-01-08.{{cite web}}: CS1 maint: multiple names: authors list (link)  This article incorporates text available under the CC BY 4.0 license.
  3. ^ Sundell, Ville (2022). "Move Patterns: Design Patterns for Resource Based Programming". Move Patterns. Retrieved 2024-01-08.  This article incorporates text available under the CC BY 4.0 license.
  4. ^ "Awesome Move". GitHub. Retrieved 2024-01-08.  This article incorporates text available under the CC BY 4.0 license.

External links[edit]