What Is the Move Language?

Advanced1/30/2023, 10:57:23 AM
Move is a functional bytecode language developed by Libra (now Diem) to solve the issues affecting blockchains, by improving limitations of some smart contracts

Blockchain and the crypto industry have revolutionized the financial sector and the world. Several start-ups have spawned to aid the industry’s growth and create widespread cryptocurrency usage. Many projects have spawned new platforms that appeal to mainstream users to attract a broader audience.

These projects are powered by several mechanisms that ensure the smooth runnings of operations, ensuring a safe, secure, and efficient platform. Smart contracts, which are computer programs, are a key component since they control the activities and events of a contract. To ensure that, the Move smart contract was created to help developers create adaptable software that eases the development of programs.

This article will examine Move’s features, uses, components, and the secret behind its recent popularity.

What Is Move?

Move is a workable bytecode language that implements smart contracts and customizable transactions. It was developed to tackle the general issues that affected blockchain programming languages. With the added advantage of security and protection, Move creates an avenue for developers to build flexible programs that easily manage and transfer digital assets.

Although it has other uses, the primary goal of the Move development team was to establish a language that guarantees that a given digital asset may be spent only once and can be held by only one person at a time.

Background of Move Programming Language

Move was developed as a secure and simple programming language for the Diem blockchain developed by Facebook. Libra was developed to be an easy, cheap, and popularly used blockchain worldwide. It was developed as a low-cost, flexible blockchain-based digital asset. Thus, Move was designed to perform blockchain transactions and allow developers to build Libra-compatible apps.

Before the end of 2020, Libra faced some issues and backlash from economic members from different countries and issues with its name and logo, which made it change its name to Diem. The launch of the blockchain failed in January 2022 due to the concerns of global powers over the security and money laundering issues the launch of Libra would create.

Move was written using the RUST language; a popular multi-paradigm programming language highly sought after by programmers worldwide in 2018. Rust’s programming language prioritized memory safety and the prevention of concurrent data races. It was developed by Graydon Hoare in 2006 while he worked for Mozilla Research.

Move Design Goals

Move’s design for the Diem blockchain was largely focused on making a safe and easily programmable platform available. To show that, Move had to showcase the Diem blockchain laws and its currency in a simple, precise, and verifiable way.

With this in mind, the Move developers selected specific design goals to support the program’s growth and remain relevant in the future. Some of the design goals include the following:

First-class resources

Move allows users to declare a custom asset as a resource type. These assets are called first-class resources and are granted special privileges and added security. The first-class resources will also be access-controlled automatically, so only users with the correct security code will be able to scale through the access point. Move also has modules like the popular Ethereum smart contract (Solidity). These modules are code blocks that hold resources and different types and procedures.

The special build of Move makes it so that resources can be completely transparent in modules while being opaque to external invocations to the module. Another important feature of the Move language is that the resources can never be copied or completely deleted. They can only be moved from one storage location to the other.

Flexibility

Transaction scripts will be included in every Diem (Libra) transaction. These transaction scripts are used in a module to make calls and call-up procedures. The single main procedure can be made up of customizable and arbitrary code. A single transaction script can call up various procedures.

Move modules give programmers flexibility with a chance to build safe codes. Move can be likened to object-oriented programming language due to its identical relationship between “classes, methods, objects” and “modules, procedures, and resources”.

Verifiability

Off-chain verification tools are also allowed on MOVE, even though it already holds a system that enables on-chain verification. This is because an on-chain verification is improper for a high-level blockchain. The introduction of off-chain verification will cut down the complex process of on-chain verification. To achieve this, the move programming language would focus on three distinct designs:

No Dynamic Dispatch

This is used to avoid complex call graph construction and allow the call sites to be statically determined.

Modularity

MOVE, with the aid of modularity, is able to isolate modules for functional verification. Move modules would help with data abstraction and localizing important resource operations.

Limited Mutability

This design is decent for cases that are geared toward the utilization of reference types that are similar to C++. It allows a maximum of one mutable reference at a point.

Safety

Three safety properties are essential in the Move programming language; type safety, resource safety, and memory safety. There are different possible approaches Move could use to ensure that programs that do not adhere to these safety properties are not accepted.

The first approach would be for Move to use a high-level programming language equipped with a compiler tasked with going through the properties.

The second approach would be using a low-level untyped assembly along with safety checks. Move takes out both approaches and relies on its execution, which is a typed bytecode that is advanced compared to bytecode and not as advanced as the source language.

How Does Move Work?

Move’s peculiar language was developed using linear logic, which limits the use of resources to once and makes it so digital assets can not be deleted or duplicated. This enables developers to encode customized resource types that cannot be implicitly erased or copied cause the resource types are treated as first-class.

Move employs a static-type system that defines variables in a programming language as a certain type (i.e., a number or a word.) Move still maintains the safety of the resources but leaves enough room to use them like any other non-first-class resource. They can easily be stored within data structures or passed as values in calculations.

This means that resources in Move are highly secured and, at the same time, able to perform without restrictions. The code provides a level of security but can also be used for all other operations easily. This is a perfect mix for blockchain programs as it solves the issues of security and scalability faced by most blockchains.

What Makes Move Unique?

Most cryptocurrency projects have a certain feature or attribute asides from the name that sets them apart from all other platforms and competitors. Move is no different in that aspect. It equipped itself with certain features that make it a better choice for existing projects. Here are a few features that set Move apart from the rest.

  • Move language involves embedded access control policies in language semantics.
  • Move does not enforce a default-type system for digital assets like Ether or Bitcoin.
  • In the entire language, you could locate a single asset locating representation. Any kind of customized asset, like ERC20 tokens, should be examined for the safety features specified by the programmer who created the tokens.
  • Move is free of the issues of limitations

Components of MOVE

Move’s unique features are not all that make the programming language run. It also comprises several components tailored to the program’s processes. Here are a few components that users can find in MOVE.

Types

In MOVE, this refers to supported primitive data types. Boolean, 64-bit unsigned integers, byte arrays of fixed size, and 256-bit addresses are all examples.

Struct

There are two types of struct. The first is called Kind, which refers to resource structures. The second one, called unrestricted, refers to the general structure.

Procedures

Under this component, we have two major methods, namely, public and internal. The acyclic module dependency helps prevent recurring attacks.

Bytecode Verifier

This component is tasked with verifying safety traits before modules are published. Programs on Move must go through the verifier before being released. The verification is broken down into different stages.

  • Verification that the size of the stack has yet to be modified upon completion of all operations.
  • Type checking
  • Control graph development
  • Reference verification
  • Linking of references to the global state for verifying declaration and usage conformance
  • Resource checking

Bytecode Interpreter

Once the verification process is completed, all programs must go through the interpreter. The execution of programs can be likened to Ethereum since both platforms use gas parameters, ensuring infinite loop executions.

Move Virtual Machine

Move’s virtual machine does not perform any differently from your average blockchain. It comprises several blocks containing multiple transactions, and each transaction, once executed, creates a transaction effect. The effects create the blockchain’s updated global state, separating effects from state transitions.

Secret Behind Move’s Recent Popularity

One would have expected Move to have become a popular programming language by now, but due to the issues Diem (formerly Libra) faced, its growth was cut short. It has recently gotten a taste of the limelight thanks to Aptos.

Aptos is a layer one blockchain created using the Move programming language. It was developed by Meta developers who decided to develop their blockchain after Meta dropped the Diem (formerly Libra) blockchain project. It combines parallel transactions and Move programming language to produce a theoretical transaction speed of 100,00 transactions per second.

The decision by Aptos to use the Move programming language created a platform that theoretically can achieve high transaction speeds and scalability without forsaking the safety of the blockchain. Aptos has set itself up with components that would help the blockchain stand out from the rest.

Move and other Programming Languages

Move is not the only available programming language; it is frequently compared to Solidity and Clarity. These three programming languages are the most used across various platforms in the blockchain space. Below is an analysis of Move’s comparison compared to the other two.

Move vs. Solidity

Solidity is a programming language built solely for creating smart contracts on the Ethereum network. As such, the members behind the Ethereum blockchain made Solidity the prime choice for implementing smart contracts for Ethereum Virtual Machines as well as EVM-compatible blockchain development platforms. The high-level, curly-bracket language took inspiration from other programming languages like Javascript, C++, and Python.

The design of solidity allows developers to script applications that make use of self-enforcing logic. Also, Solidity making use of javascript syntax as an inspiration has led to Javascript being easily understood and implemented by developers.

Like Solidity, Move was created with different networks in mind. The premier network for implementing the Move language was Diem, which was eventually dissolved. Solidity, on the other hand, was developed for the popular Ethereum blockchain, which is still running till today.

The level of security in the face of re-entrance attacks is a big difference between Move and Solidity. Solidity is commonly known to be vulnerable to re-entrance attacks if the code built with the language is weak. Move, on the other hand, does not suffer from re-entrance attacks due to its asset security features (resource definition and control authority separation, static typing, generics, module system, and formal verification.)

Lastly, a key factor for developers in choosing a programming language is ease of use. Solidity is known as one of the most flexible languages out there, and that is why it still popularly used today. Move, unfortunately, is not as flexible, but it is still easy to use.

Move vs. Clarity

Blockstack is a platform that is set on developing its own internet and providing smart contract services and facilities. To facilitate that, Blockstack introduced Clarity as the smart contract programming language for their very own Stacks Blockchain. Clarity is a programming language that allows users to develop their own special terms for the contract rather than pre-programmed ones.

Clarity also eliminates the chances of unexpected transactions taking place, giving it an extra level of security. One major feature of clarity is an aspect of certainty that provides a “decidable” programming language that states what the computer will do with the code.

Move is based on Diem, a highly scalable, safe, and flexible blockchain, while Clarity is based on Stack 2.0, an open-source network for different dApps that use the Ethereum network to create new ones.

Move’s compilation also sets it apart from Clarity. Move makes use of a compiler for the execution of its codes. Unlike Move, Clarity does not use a compiler while executing a code.

Conclusion

Move has shown itself to be a special type of programming language that will revolutionize the blockchain industry as a whole. So far, it has drawn the attention of new blockchain Aptos, and only time will tell just how successful the combination will be.

Author: Tamilore
Translator: piper
Reviewer(s): Hugo、Edward、Ashely、Joyce
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.

What Is the Move Language?

Advanced1/30/2023, 10:57:23 AM
Move is a functional bytecode language developed by Libra (now Diem) to solve the issues affecting blockchains, by improving limitations of some smart contracts

Blockchain and the crypto industry have revolutionized the financial sector and the world. Several start-ups have spawned to aid the industry’s growth and create widespread cryptocurrency usage. Many projects have spawned new platforms that appeal to mainstream users to attract a broader audience.

These projects are powered by several mechanisms that ensure the smooth runnings of operations, ensuring a safe, secure, and efficient platform. Smart contracts, which are computer programs, are a key component since they control the activities and events of a contract. To ensure that, the Move smart contract was created to help developers create adaptable software that eases the development of programs.

This article will examine Move’s features, uses, components, and the secret behind its recent popularity.

What Is Move?

Move is a workable bytecode language that implements smart contracts and customizable transactions. It was developed to tackle the general issues that affected blockchain programming languages. With the added advantage of security and protection, Move creates an avenue for developers to build flexible programs that easily manage and transfer digital assets.

Although it has other uses, the primary goal of the Move development team was to establish a language that guarantees that a given digital asset may be spent only once and can be held by only one person at a time.

Background of Move Programming Language

Move was developed as a secure and simple programming language for the Diem blockchain developed by Facebook. Libra was developed to be an easy, cheap, and popularly used blockchain worldwide. It was developed as a low-cost, flexible blockchain-based digital asset. Thus, Move was designed to perform blockchain transactions and allow developers to build Libra-compatible apps.

Before the end of 2020, Libra faced some issues and backlash from economic members from different countries and issues with its name and logo, which made it change its name to Diem. The launch of the blockchain failed in January 2022 due to the concerns of global powers over the security and money laundering issues the launch of Libra would create.

Move was written using the RUST language; a popular multi-paradigm programming language highly sought after by programmers worldwide in 2018. Rust’s programming language prioritized memory safety and the prevention of concurrent data races. It was developed by Graydon Hoare in 2006 while he worked for Mozilla Research.

Move Design Goals

Move’s design for the Diem blockchain was largely focused on making a safe and easily programmable platform available. To show that, Move had to showcase the Diem blockchain laws and its currency in a simple, precise, and verifiable way.

With this in mind, the Move developers selected specific design goals to support the program’s growth and remain relevant in the future. Some of the design goals include the following:

First-class resources

Move allows users to declare a custom asset as a resource type. These assets are called first-class resources and are granted special privileges and added security. The first-class resources will also be access-controlled automatically, so only users with the correct security code will be able to scale through the access point. Move also has modules like the popular Ethereum smart contract (Solidity). These modules are code blocks that hold resources and different types and procedures.

The special build of Move makes it so that resources can be completely transparent in modules while being opaque to external invocations to the module. Another important feature of the Move language is that the resources can never be copied or completely deleted. They can only be moved from one storage location to the other.

Flexibility

Transaction scripts will be included in every Diem (Libra) transaction. These transaction scripts are used in a module to make calls and call-up procedures. The single main procedure can be made up of customizable and arbitrary code. A single transaction script can call up various procedures.

Move modules give programmers flexibility with a chance to build safe codes. Move can be likened to object-oriented programming language due to its identical relationship between “classes, methods, objects” and “modules, procedures, and resources”.

Verifiability

Off-chain verification tools are also allowed on MOVE, even though it already holds a system that enables on-chain verification. This is because an on-chain verification is improper for a high-level blockchain. The introduction of off-chain verification will cut down the complex process of on-chain verification. To achieve this, the move programming language would focus on three distinct designs:

No Dynamic Dispatch

This is used to avoid complex call graph construction and allow the call sites to be statically determined.

Modularity

MOVE, with the aid of modularity, is able to isolate modules for functional verification. Move modules would help with data abstraction and localizing important resource operations.

Limited Mutability

This design is decent for cases that are geared toward the utilization of reference types that are similar to C++. It allows a maximum of one mutable reference at a point.

Safety

Three safety properties are essential in the Move programming language; type safety, resource safety, and memory safety. There are different possible approaches Move could use to ensure that programs that do not adhere to these safety properties are not accepted.

The first approach would be for Move to use a high-level programming language equipped with a compiler tasked with going through the properties.

The second approach would be using a low-level untyped assembly along with safety checks. Move takes out both approaches and relies on its execution, which is a typed bytecode that is advanced compared to bytecode and not as advanced as the source language.

How Does Move Work?

Move’s peculiar language was developed using linear logic, which limits the use of resources to once and makes it so digital assets can not be deleted or duplicated. This enables developers to encode customized resource types that cannot be implicitly erased or copied cause the resource types are treated as first-class.

Move employs a static-type system that defines variables in a programming language as a certain type (i.e., a number or a word.) Move still maintains the safety of the resources but leaves enough room to use them like any other non-first-class resource. They can easily be stored within data structures or passed as values in calculations.

This means that resources in Move are highly secured and, at the same time, able to perform without restrictions. The code provides a level of security but can also be used for all other operations easily. This is a perfect mix for blockchain programs as it solves the issues of security and scalability faced by most blockchains.

What Makes Move Unique?

Most cryptocurrency projects have a certain feature or attribute asides from the name that sets them apart from all other platforms and competitors. Move is no different in that aspect. It equipped itself with certain features that make it a better choice for existing projects. Here are a few features that set Move apart from the rest.

  • Move language involves embedded access control policies in language semantics.
  • Move does not enforce a default-type system for digital assets like Ether or Bitcoin.
  • In the entire language, you could locate a single asset locating representation. Any kind of customized asset, like ERC20 tokens, should be examined for the safety features specified by the programmer who created the tokens.
  • Move is free of the issues of limitations

Components of MOVE

Move’s unique features are not all that make the programming language run. It also comprises several components tailored to the program’s processes. Here are a few components that users can find in MOVE.

Types

In MOVE, this refers to supported primitive data types. Boolean, 64-bit unsigned integers, byte arrays of fixed size, and 256-bit addresses are all examples.

Struct

There are two types of struct. The first is called Kind, which refers to resource structures. The second one, called unrestricted, refers to the general structure.

Procedures

Under this component, we have two major methods, namely, public and internal. The acyclic module dependency helps prevent recurring attacks.

Bytecode Verifier

This component is tasked with verifying safety traits before modules are published. Programs on Move must go through the verifier before being released. The verification is broken down into different stages.

  • Verification that the size of the stack has yet to be modified upon completion of all operations.
  • Type checking
  • Control graph development
  • Reference verification
  • Linking of references to the global state for verifying declaration and usage conformance
  • Resource checking

Bytecode Interpreter

Once the verification process is completed, all programs must go through the interpreter. The execution of programs can be likened to Ethereum since both platforms use gas parameters, ensuring infinite loop executions.

Move Virtual Machine

Move’s virtual machine does not perform any differently from your average blockchain. It comprises several blocks containing multiple transactions, and each transaction, once executed, creates a transaction effect. The effects create the blockchain’s updated global state, separating effects from state transitions.

Secret Behind Move’s Recent Popularity

One would have expected Move to have become a popular programming language by now, but due to the issues Diem (formerly Libra) faced, its growth was cut short. It has recently gotten a taste of the limelight thanks to Aptos.

Aptos is a layer one blockchain created using the Move programming language. It was developed by Meta developers who decided to develop their blockchain after Meta dropped the Diem (formerly Libra) blockchain project. It combines parallel transactions and Move programming language to produce a theoretical transaction speed of 100,00 transactions per second.

The decision by Aptos to use the Move programming language created a platform that theoretically can achieve high transaction speeds and scalability without forsaking the safety of the blockchain. Aptos has set itself up with components that would help the blockchain stand out from the rest.

Move and other Programming Languages

Move is not the only available programming language; it is frequently compared to Solidity and Clarity. These three programming languages are the most used across various platforms in the blockchain space. Below is an analysis of Move’s comparison compared to the other two.

Move vs. Solidity

Solidity is a programming language built solely for creating smart contracts on the Ethereum network. As such, the members behind the Ethereum blockchain made Solidity the prime choice for implementing smart contracts for Ethereum Virtual Machines as well as EVM-compatible blockchain development platforms. The high-level, curly-bracket language took inspiration from other programming languages like Javascript, C++, and Python.

The design of solidity allows developers to script applications that make use of self-enforcing logic. Also, Solidity making use of javascript syntax as an inspiration has led to Javascript being easily understood and implemented by developers.

Like Solidity, Move was created with different networks in mind. The premier network for implementing the Move language was Diem, which was eventually dissolved. Solidity, on the other hand, was developed for the popular Ethereum blockchain, which is still running till today.

The level of security in the face of re-entrance attacks is a big difference between Move and Solidity. Solidity is commonly known to be vulnerable to re-entrance attacks if the code built with the language is weak. Move, on the other hand, does not suffer from re-entrance attacks due to its asset security features (resource definition and control authority separation, static typing, generics, module system, and formal verification.)

Lastly, a key factor for developers in choosing a programming language is ease of use. Solidity is known as one of the most flexible languages out there, and that is why it still popularly used today. Move, unfortunately, is not as flexible, but it is still easy to use.

Move vs. Clarity

Blockstack is a platform that is set on developing its own internet and providing smart contract services and facilities. To facilitate that, Blockstack introduced Clarity as the smart contract programming language for their very own Stacks Blockchain. Clarity is a programming language that allows users to develop their own special terms for the contract rather than pre-programmed ones.

Clarity also eliminates the chances of unexpected transactions taking place, giving it an extra level of security. One major feature of clarity is an aspect of certainty that provides a “decidable” programming language that states what the computer will do with the code.

Move is based on Diem, a highly scalable, safe, and flexible blockchain, while Clarity is based on Stack 2.0, an open-source network for different dApps that use the Ethereum network to create new ones.

Move’s compilation also sets it apart from Clarity. Move makes use of a compiler for the execution of its codes. Unlike Move, Clarity does not use a compiler while executing a code.

Conclusion

Move has shown itself to be a special type of programming language that will revolutionize the blockchain industry as a whole. So far, it has drawn the attention of new blockchain Aptos, and only time will tell just how successful the combination will be.

Author: Tamilore
Translator: piper
Reviewer(s): Hugo、Edward、Ashely、Joyce
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.
Start Now
Sign up and get a
$100
Voucher!