{"id":6314,"date":"2024-07-17T11:06:00","date_gmt":"2024-07-17T11:06:00","guid":{"rendered":"https:\/\/metaschool.so\/articles\/?p=6314"},"modified":"2025-02-07T10:39:55","modified_gmt":"2025-02-07T10:39:55","slug":"guide-move-programming-language","status":"publish","type":"post","link":"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/","title":{"rendered":"Move Programming Language: A Beginner\u2019s Guide to Web3 Development"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_56_1 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/#What_is_Move\" title=\"What is Move?\">What is Move?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/#How_is_Move_different_from_other_blockchain_languages\" title=\"How is Move different from other blockchain languages?\">How is Move different from other blockchain languages?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/#What_are_the_critical_design_goals_undertaken_by_Move\" title=\"What are the critical design goals undertaken by Move?\">What are the critical design goals undertaken by Move?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/#Common_concepts_in_the_Move_Programming_Language\" title=\"Common concepts in the Move Programming Language\">Common concepts in the Move Programming Language<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/#Why_Use_Move_Key_Benefits_for_Developers\" title=\"Why Use Move? Key Benefits for Developers\">Why Use Move? Key Benefits for Developers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/#Move_tools_and_libraries_for_development\" title=\"Move tools and libraries for development\">Move tools and libraries for development<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/#How_to_write_a_smart_contract_in_the_Move_programming_language\" title=\"How to write a smart contract in the Move programming language\">How to write a smart contract in the Move programming language<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/metaschool.so\/articles\/guide-move-programming-language\/#FAQs\" title=\"FAQs\">FAQs<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>The<strong> <\/strong><a href=\"https:\/\/metaschool.so\/articles\/what-is-web3-guide\/\">web3<\/a> space is filled with new programming languages. Some grow a lot more popular, while some don\u2019t. However, each language has an interesting story. The Move programming language also has one.&nbsp;<\/p>\n\n\n\n<p>In this detailed Move programming language guide, we will learn about the history of Move Language, why Facebook developed it, its design language and structure, and how you, as a developer, can leverage it.\u00a0 If you are a developer interested to learn Move language and build <a href=\"https:\/\/metaschool.so\/articles\/dapps-decentralised-applications\">dApps<\/a> on <a href=\"https:\/\/metaschool.so\/blockchains\/sui\">Sui<\/a>, this is the right place for you.<\/p>\n\n\n\n<p><strong>\ud83d\udea8 New Course:<\/strong> <a href=\"https:\/\/metaschool.so\/courses\/create-fungible-token-sui-blockchain-move-language\" target=\"_blank\" rel=\"noreferrer noopener\">Learn to Create a Fungible Token with Sui Move<\/a> (Free and guided step-by-step course to learn to build on Sui blockchain).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-move\"><span class=\"ez-toc-section\" id=\"What_is_Move\"><\/span>What is Move?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The Move programming language is open-source tool for web3 developers to <a href=\"https:\/\/metaschool.so\/courses\/create-a-horoscope-web3-nft-application\" target=\"_blank\" rel=\"noreferrer noopener\">write blockchain applications<\/a>. It is one of the more recent programming languages, with an executable bytecode language for smart contracts and custom transactions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-did-facebook-develop-move\">Why did Facebook develop Move?<\/h3>\n\n\n\n<p>One of the most exciting and important things about the Move programming language is that it was developed by Facebook. Just like Go was developed by Google itself.&nbsp;<\/p>\n\n\n\n<p>All of this started in 2019 when one of the biggest social media giants, Facebook, came up with the idea of Libra, a stablecoin. Move was first introduced as a native language to Libra. Then in 2020, Libra became Diem due to some regulatory challenges. In 2022, it was eventually sold to Silvergate Capital Corporation because Diem was practically dead. Facebook\u2019s stablecoin project did not work.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"391\" src=\"https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/ab23ab0e-b79c-4067-a652-1962e6683b06.webp\" alt=\"Move Programming Language developed by Facebook.\" class=\"wp-image-6360\" srcset=\"https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/ab23ab0e-b79c-4067-a652-1962e6683b06.webp 885w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/ab23ab0e-b79c-4067-a652-1962e6683b06-300x133.webp 300w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/ab23ab0e-b79c-4067-a652-1962e6683b06-150x66.webp 150w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/ab23ab0e-b79c-4067-a652-1962e6683b06-768x339.webp 768w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/figure>\n<\/div>\n\n\n<p>However, what remained was the Move programming language that was specifically designed for the Diem (then Libra blockchain).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-exactly-are-stablecoins\">What exactly are stablecoins?&nbsp;<\/h3>\n\n\n\n<p>Stablecoins are an equally investible but less volatile alternative to popular cryptocurrencies such as <a href=\"https:\/\/metaschool.so\/blockchains\/bitcoin\" target=\"_blank\" rel=\"noreferrer noopener\">BTC<\/a>, <a href=\"https:\/\/metaschool.so\/blockchains\/ethereum\" target=\"_blank\" rel=\"noreferrer noopener\">ETH<\/a>, etc. They were first introduced in 2014. As of June 2020, there are some <a href=\"https:\/\/bitpay.com\/blog\/guide-to-stablecoins\/#:~:text=How%20many%20stablecoins%20are%20there,billion%20as%20of%20June%202022.\" target=\"_blank\" rel=\"noreferrer noopener\">200 stablecoins<\/a>. There are two types of stablecoins; fiat-backed stablecoins and algorithmic stablecoins.&nbsp;<\/p>\n\n\n\n<p>\ud83c\udf31 <strong>Check this guide: <\/strong><a href=\"https:\/\/metaschool.so\/articles\/how-to-create-a-crypto-coin\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to create a crypto coin<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"1-fiat-backed-stablecoins\">1. Fiat-backed stablecoins<\/h4>\n\n\n\n<p>These stablecoins are backed by a reserve of fiat currency, such as USD. For example, if there are USD 100,000 Coin (USDC) tokens in circulation, then there must also be USD 100,000 held in reserve. This way, the coins remain stable.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"2-algorithmic-stablecoins\">2. Algorithmic stablecoins<\/h4>\n\n\n\n<p>There is no currency backing involved here. In algorithmic stablecoins, there are algorithms that maintain the value of a stablecoin by minting and burning tokens. For example, if the price of a stablecoin starts to go up, the algorithm may automatically mint more tokens, which will increase the supply and drive the price down.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"facebook-s-rationale-and-motive-behind-libra\">Facebook\u2019s rationale and motive behind Libra<\/h3>\n\n\n\n<p>Launched as something that was expected to revolutionize and transform the global economy, Facebook wanted Libra to serve as an intermediary for transferring traditional currencies. It was also connected to WhatsApp and Facebook Messenger.<\/p>\n\n\n\n<p>How it would have worked, had it not failed, is that users would convert their currencies to Libra and send it to anyone with a Libra-compatible wallet, Calibra (changed to Novi, later on). Libra initially served as a bridge between cryptocurrency and fiat currency. However, fate had some other plans and it did not work out.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"which-blockchains-use-move-the-most-currently\">Which blockchains use Move the most currently?<\/h3>\n\n\n\n<p>Blockchains that have been using the Move programming language frequently are <a href=\"https:\/\/metaschool.so\/blockchains\/aptos\" target=\"_blank\" rel=\"noreferrer noopener\">Aptos<\/a> and the <a href=\"https:\/\/metaschool.so\/blockchains\/sui\" target=\"_blank\" rel=\"noreferrer noopener\">Sui blockchain<\/a>. Starcoin is also yet another project that uses Move. All three blockchains are <a href=\"https:\/\/metaschool.so\/articles\/layer-1-blockchain\/\">L1s<\/a> with an emphasis on writing smart contracts for <a href=\"https:\/\/metaschool.so\/articles\/defi-meaning\/\">DeFi<\/a>, <a href=\"https:\/\/metaschool.so\/articles\/gamefi-meaning\/\">GameFi<\/a>, and other blockchain applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-is-move-different-from-other-blockchain-languages\"><span class=\"ez-toc-section\" id=\"How_is_Move_different_from_other_blockchain_languages\"><\/span>How is Move different from other blockchain languages?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Move\u2019s two big competitors are <a href=\"https:\/\/metaschool.so\/articles\/guide-solidity-contracts\">Solidity<\/a> and Vyper. And there are some ways in which the Move programming is different from them and other blockchain programming languages.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>Factors<\/strong><\/th><th><strong>Move&nbsp;<\/strong><\/th><th><strong>Others (Solidity, Vyper, etc.)<\/strong><\/th><\/tr><\/thead><tbody><tr><td>How it is typed<\/td><td>Statically typed and strongly typed which means there is generally less room for errors and the code is more readable<\/td><td>Dynamically typed which means the compiler tries to figure out the type of a variable or expression based on how it is used.<\/td><\/tr><tr><td>Performance optimization<\/td><td>Has techniques such as inlining functions and avoiding unnecessary memory allocations, to optimize the performance of various blockchain applications such as smart contracts<\/td><td>Do not have such techniques to optimize the performance of blockchain applications<\/td><\/tr><tr><td>Type system<\/td><td>Uses a linear type system meaning no one variable can be used for two different purposes<\/td><td>Use a non-linear type system meaning that one variable can be used for two different purposes<\/td><\/tr><tr><td>Digital assets<\/td><td>Has an in-built type that represents digital assets<\/td><td>Do not have an in-built to represent digital assets<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-the-critical-design-goals-undertaken-by-move\"><span class=\"ez-toc-section\" id=\"What_are_the_critical_design_goals_undertaken_by_Move\"><\/span>What are the critical design goals undertaken by Move?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As a smart contract programming language, Move has undertaken a number of design goals with time. These design goals specifically help Move to grow and develop an infrastructure that could help further help establish efficient and secure blockchains.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-first-class-resources\">1. First-class resources<\/h3>\n\n\n\n<p>The thing with <a href=\"https:\/\/metaschool.so\/articles\/blockchain-programming-languages-development\/\">blockchain languages<\/a> is that they deal with virtual assets, unlike traditional assets that tend to be tangible. Now, digital assets have two important qualities; they tend to be scarce and they have access control, meaning only certain people can modify them. For programming languages, it is important that the developers are able to express these qualities. This is exactly what the first-class resources of the Move programming language do. They make it easier to <a href=\"https:\/\/metaschool.so\/courses\/how-to-write-a-smart-contract-and-mint-elon-musk-nft-on-opensea\" target=\"_blank\" rel=\"noreferrer noopener\">write digital assets<\/a> that are scarce in nature and have access control.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-flexibility\">2. Flexibility<\/h3>\n\n\n\n<p>The Move programming language has modules that allow one to compose code with flexibility. Move is not an <a href=\"https:\/\/metaschool.so\/articles\/object-oriented-programming-deepdive\/\">object-oriented programming<\/a> language. However, its components &#8211; modules, procedures, resources, and the relationship between them &#8211; is similar to the components in an object-oriented language. Move also allows for declaring multiple resource types which makes it more expressive and flexible as a language.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-verifiability\">3. Verifiability<\/h3>\n\n\n\n<p>The Move programming language is known for being capable enough to ensure on-chain verification for all the safety traits. But given that blockchains are utilized frequently, verification of all the safety traits will not be possible. This is why Move has off-chain static verification tools as well. Thus, the complexities with on-chain verification are addressed easily on Move and this is made possible by the three designs which include:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-lack-of-dynamic-dispatch\">4. Lack of dynamic dispatch<\/h3>\n\n\n\n<p>This particular design helps Move easily identify the effects of a procedure call without diving into complexities.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5-modularity\">5. Modularity<\/h3>\n\n\n\n<p>Move allows the isolation of modules for the sake of functional verification. This means that the code outside of the modules specified by Move can not violate the types of a module. In the long run, the modular design could also enable comprehensive functional verification for crucial module invariants by reviewing isolated modules.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6-limitated-mutability\">6. Limitated mutability<\/h3>\n\n\n\n<p>Limited mutability in the Move programming language means that values can only be mutated through references. This means that there can only be one mutable reference to a value at any given time. This helps to prevent errors that can occur when multiple mutable references to a value are used.<\/p>\n\n\n\n<p>\u2600\ufe0f <strong>Read more:<\/strong> <a href=\"https:\/\/metaschool.so\/articles\/immutable-blockchain\/\">What does immutable mean?<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"7-safety\">7. Safety<\/h3>\n\n\n\n<p>One more goal undertaken by the Move programming language is safety. Move language focuses on the on-chain checking of bytecode for memory safety, resource, and type. After the checking process, the bytecode goes for execution directly through a bytecode interpreter. As a result, Move could enable safety privileges that are commonly related to a specific source language.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"common-concepts-in-the-move-programming-language\"><span class=\"ez-toc-section\" id=\"Common_concepts_in_the_Move_Programming_Language\"><\/span>Common concepts in the Move Programming Language<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"common-concepts-in-the-move-programming-language\">Data types<\/h3>\n\n\n\n<p>Like every programming language, each value that you see on Move belongs to a certain data type. This helps the language to determine which value is specified to which data type.&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Boolean: the boolean type has only two values. It can either be true or false.<\/li>\n\n\n\n<li>Unsigned integers: integers that can only hold non-negative values<\/li>\n\n\n\n<li>Fixed-size byte arrays: arrays of bytes that have a fixed length<\/li>\n\n\n\n<li>Address: unique identifiers that are used to refer to resources in the Move programming language<\/li>\n\n\n\n<li>Struct: a data type that can be used to group together related data<br>a) <em>Kind<\/em> &#8211; determines how a struct can be used<br>b) <em>Unrestricted<\/em><strong> <\/strong>-procedures that can be called from any module<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"procedures\">Procedures<\/h3>\n\n\n\n<p>Procedures in Move are methods that could be classified into public and and internal. Although they are similar to other functions within a programming language, they have some differences. Procedures are always named, can have parameters, and can return values.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Public procedures: accessible to all other modules in the system. They can be called from any other module, and their results can be used by any other module.<\/li>\n\n\n\n<li>Internal procedures: only accessible to the module in which they are defined. They cannot be called from other modules, and their results cannot be used by other modules.<\/li>\n<\/ol>\n\n\n\n<p>\ud83d\udc40 <strong>Also see:<\/strong> <a href=\"https:\/\/metaschool.so\/articles\/guide-clarity-smart-contract-programming-language\/\">Clarity Smart Contract Language 2023 Guide<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"bytecode-verifier\">Bytecode verifier<\/h3>\n\n\n\n<p>The bytecode verifier in Move is a tool that ensures that Move bytecode is valid and safe to execute. The bytecode verifier performs a number of checks on the bytecode, including:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Type checking: checks that the types of values are correct<\/li>\n\n\n\n<li>Stack balance checking: checks that the stack is balanced at all times<\/li>\n\n\n\n<li>Reference checking: checks that references are used correctly<\/li>\n\n\n\n<li>Control graph development: develops the control graph of the bytecode<\/li>\n\n\n\n<li>Reference linking: links references together<\/li>\n\n\n\n<li>Resource checking: checks that resources are used correctly<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"508\" src=\"https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/movebytecodeverifier-1024x508.jpg\" alt=\"move language bytcode verifier process how it works\" class=\"wp-image-6361\" srcset=\"https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/movebytecodeverifier-1024x508.jpg 1024w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/movebytecodeverifier-300x149.jpg 300w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/movebytecodeverifier-150x74.jpg 150w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/movebytecodeverifier-768x381.jpg 768w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/movebytecodeverifier-1536x762.jpg 1536w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/movebytecodeverifier-2048x1015.jpg 2048w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/movebytecodeverifier-1320x654.jpg 1320w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Source: Aptos<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"benefits-of-move-programming-language\"><span class=\"ez-toc-section\" id=\"Why_Use_Move_Key_Benefits_for_Developers\"><\/span>Why Use Move? Key Benefits for Developers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As a programming language designed specifically for <a href=\"https:\/\/metaschool.so\/courses\/how-to-create-your-own-blockchain\" target=\"_blank\" rel=\"noreferrer noopener\">blockchain development<\/a>, most of its features are developer-centric. Some of its features are testament to the claim that it is a developer-centric language are like preventing security vulnerabilities, ensuring reliability, making it easy to learn and use, etc. These features are enabled by the following characteristics of the language:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-strongly-typed\">1. Strongly-typed<\/h3>\n\n\n\n<p>Move is  a strongly-typed language. This means that it greatly helps in preventing errors because a strongly-typed language must have the variable declared explicitly. Once the compiler agrees that the variable is uses correctly,  it will help catch errors during the development process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-resource-oriented-programming\">2. Resource-oriented programming<\/h3>\n\n\n\n<p>Unlike most of its counterparts, Move is not an object-oriented language. It is resource-oriented instead. This means that the security vulnerabilities in the Move programming language are easily preventable. This is because resources have a limited life, they can&#8217;t be copied and neither can they be dropped.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-verification\">3. Verification<\/h3>\n\n\n\n<p>Move code can be verified, which means that it can be proven that the code will behave as intended. This is done using a formal verification tool, which checks the code for errors. Verification also ensures the safety and reliability of a code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"move-tools-and-libraries-for-development\"><span class=\"ez-toc-section\" id=\"Move_tools_and_libraries_for_development\"><\/span>Move tools and libraries for development<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-libraries\">1. Libraries<\/h3>\n\n\n\n<p>In programming, libraries greatly help to optimize a developer\u2019s coding. Libraries have pre-written codes that developers can put into use.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Move Std: a collection of standard modules that are used by many Move smart contracts.<\/li>\n\n\n\n<li>Move Account Library: helps in managing accounts on the Move blockchain<\/li>\n\n\n\n<li>Move Transaction Library: helps in managing transactions on the Move blockchain<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-tools\">2. Tools<\/h3>\n\n\n\n<p>In programming, tools help you provide an environment, help you streamline your instructions, and test and implement the program.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Move Prover: used to check the correctness of the codes<\/li>\n\n\n\n<li>Move Compiler: used to compile a code into bytecode <\/li>\n\n\n\n<li>Move Playground: <a href=\"https:\/\/metaschool.so\/articles\/remix-ide-ethereum\/\">web-based IDE<\/a> that is used to write, compile and debug Move code<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"995\" src=\"https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-25-at-3.28.10-PM-1024x995.png\" alt=\"Move language playground by pontem IDE\" class=\"wp-image-6359\" srcset=\"https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-25-at-3.28.10-PM-1024x995.png 1024w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-25-at-3.28.10-PM-300x291.png 300w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-25-at-3.28.10-PM-150x146.png 150w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-25-at-3.28.10-PM-768x746.png 768w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-25-at-3.28.10-PM.png 1300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Source: Pontem<\/figcaption><\/figure>\n<\/div>\n\n\n<p>\ud83d\udcf0 <strong>Also see:<\/strong> <a href=\"https:\/\/metaschool.so\/articles\/solana-introduces-solang-solidity-compiler\/\">Solana Unveils Solang to Woo Ethereum Devs<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-write-a-smart-contract-in-the-move-programming-language\"><span class=\"ez-toc-section\" id=\"How_to_write_a_smart_contract_in_the_Move_programming_language\"><\/span>How to write a smart contract in the Move programming language<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Writing a simple smart contract in the Move programming language does not take much. All you have to do is follow these few simple steps mentioned below and you will have created a smart contract using Move. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-create-a-brand-new-file\">1. Create a brand new file<\/h3>\n\n\n\n<p>Name it <code>Counter.move<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2\">2. Define a module called Counter<\/h3>\n\n\n\n<p id=\"step-2\">It will be called <code>Counter<\/code>, like this. \ud83d\udc47\ud83c\udffc<\/p>\n\n\n\n<p><code>module Counter {<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-define-two-public-procedures-called-increment-and-get\">3. Define two public procedures called <code>increment<\/code> and <code>get<\/code><\/h3>\n\n\n\n<p class=\"has-nv-site-bg-background-color has-background\"><code>public fun increment(counter: &amp;mut Counter): u64 {<br>\/\/ Increment the counter value.<br>counter.value = counter.value + 1;<\/code><\/p>\n\n\n\n<p class=\"has-nv-site-bg-background-color has-background\"><code>\/\/ Return the new counter value.<br>return counter.value;<br>}<\/code><\/p>\n\n\n\n<p class=\"has-nv-site-bg-background-color has-background\"><code>public fun get(counter: &amp;Counter): u64 {<br>\/\/ Return the current counter value.<br>return counter.value;<br>}<br>}<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-finally-compile-the-code\">4. Finally, compile the code<\/h3>\n\n\n\n<p>Use command <code>movec Counter.move<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faqs\"><span class=\"ez-toc-section\" id=\"FAQs\"><\/span>FAQs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-66a0af2a21c2c\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is a move language?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Move programming language was came into existence at Facebook as it was used to build Diem blockchain. It was built by Diem Association based by Meta (Facebook). Although the Diem project didn&#8217;t take off, the Move programming language is widely used today.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-66a0af2a21c39\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Is move better than Solidity?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Each programming language has its own pros and cons. Also, different programming languages are built to serve specific use cases. If we company Move vs. Solidity vs. <a href=\"https:\/\/metaschool.so\/articles\/learn-rust\">Rust<\/a>: Move is relatively slower compared to compiled languages, since it is an interpreted language. But, Move gets memory efficiency and parallel processing (from Rust), making it a great choice for developers.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-66a0af2a21c41\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Who uses Move language?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Blockchain platforms like Aptos, Sui, and Starcoin uses Move language.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-66a0af2a21c49\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What are the advantages of move language?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The Move programming language is optimised for verifiability (to make it easy for developers to find and fix bugs). It scores high on safety, flexibility, and developer tooling for streamlined development<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-66a0af2a21c55\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Can I learn move smart contract programming language for free?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes, there are many free hands-on <a href=\"https:\/\/metaschool.so\/courses\">courses on Metaschool<\/a> that you can enroll for free and start developing <a href=\"https:\/\/metaschool.so\/articles\/what-are-nfts\">NFTs<\/a>, Dapps, and web3 projects in different blockchains. You&#8217;ll find courses that guide you on creating smart contracts in Ethereum, Solana, and many other web3 ecosystems.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n<p id=\"in-conclusion\"><strong>In conclusion<\/strong>,<\/p>\n\n\n\n<p>Move is a strongly-typed, resource-oriented and simple <a href=\"https:\/\/metaschool.so\/courses\/writing-your-first-hello-world-contract-in-solidity\" target=\"_blank\" rel=\"noreferrer noopener\">smart contract programming<\/a> language. A number of features make it a developer-centric language. Once used as a native language to Diem blockchain, Move is mostly used to code in Sui blockchain. This guide contains the features and important components of the Move programming language, its syntax, how to write a simple smart contract using the language, and its goals and what it aims to achieve.<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":11,"featured_media":11753,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"[\"title\",\"meta\",\"thumbnail\",\"content\",\"tags\",\"comments\"]","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[17],"tags":[],"class_list":["post-6314","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain"],"_links":{"self":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/6314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/comments?post=6314"}],"version-history":[{"count":24,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/6314\/revisions"}],"predecessor-version":[{"id":12265,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/6314\/revisions\/12265"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/media\/11753"}],"wp:attachment":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/media?parent=6314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/categories?post=6314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/tags?post=6314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}