The hype surrounding blockchain technology is practically unavoidable these days — and whether you’re fully on board with the ethos of decentralized software or remain skeptical about Web3, you might be wondering what sort of tech skills and programming languages will be valuable in the new “Wild West” of the internet.
The good news is lots of coding languages that you already know can be used in blockchain development (more on that later). And even the newer languages that are specific to smart contracts, the essential building blocks of the programmable blockchain, are relatively easy to pick up if you have some basic coding knowledge.
But before you start learning a language, you should do a little research and decide which blockchain platform interests you the most, says Kenny Rogers, Developer Advocate at the Stacks Foundation. “There are tons of them right now, which is kind of overwhelming,” Kenny says. “And they all claim to be doing different things the best way.”
For example, maybe your Twitter feed is full of Ethereum news, or you keep seeing job listings for Web3 developers who know Solana. Once you narrow down which blockchain platform to focus on, you can dig in and see the specific programming languages they use.
In our free course Introduction to Blockchain and Crypto, built in partnership with the Stacks Foundation, you’ll learn about different chains and their practical use cases, and walk away with an objective, high-level understanding of blockchain development. Here are the programming languages that are used the most in blockchain development, and what you need to know about each of them.
Solidity
Solidity is the most commonly used language for writing and deploying smart contracts on the Ethereum chain. It’s a statically typed curly-braces programming language that has familiar features that you might recognize from other languages.
“Solidity looks rather high-level but is still very close to the [Ethereum Virtual Machine],” Christian Reitwiessner, creator of Solidity, said in a 2020 interview. “At the same time, people with some background in programming usually understand what Solidity code is about.”
Solidity’s main influences are JavaScript, C++, and Python. If you have a solid (sorry) understanding of those languages, then picking up Solidity is relatively easy. Check out our course catalog for courses on JavaScript, C++, and Python (as well as our new Intro to Blockchain course).
C++
Known for its speed and efficiency, C++ is a powerful object-oriented programming language that frequently comes up in Web3. (Fun fact: Bitcoin was written in C++, which C++ creator Bjarne Stroustrup was not thrilled about.) C++ can be used for smart contract development on the EOS blockchain.
Of course, there are many other reasons to learn C++ that aren’t directly related to the blockchain. C++ is a general-purpose language that can reliably run large software infrastructure and applications on few resources, making it the go-to for performance-critical applications. C++ is used for everything from gaming to financial software to AR/VR applications.
Learn one of the world’s most widely used programming languages with our beginner-friendly course Learn C++. If you’re already familiar with the fundamentals of coding, or need a C++ syntax refresher, check out our C++ for Programmers course.
Rust
Rust is consistently ranked the most-loved programming language in Stack Overflow’s developer survey, with 87% of devs saying they want to keep using it. One reason why Rust is beloved is because it’s type- and memory-safe, and those safety features are why it’s preferred for blockchain development. Rust is used to build smart contracts on chains like Solana and NEAR.
“If you know Rust, depending on the blockchain that you choose to work in, you can very likely meaningfully contribute both to the blockchain work itself and also smart contract development,” Kenny says. Want to learn Rust? Keep an eye out for our new course Rust for Programmers, launching soon.
JavaScript
Good news for JavaScript fans: “For both Web3 and Web 2.0, JavaScript is the number one thing to learn if you don’t know it already,” Kenny says. If you initially learned JavaScript to build websites and apps, that knowledge can still serve you in the Web3 and blockchain space. (And if you haven’t dabbled with JavaScript yet, we have lots of JavaScript courses at every level for you to explore.)
Let’s say you’re a Front-End Engineer who builds an app with JavaScript. You can make your application interact with existing smart contracts or the blockchain itself without needing to learn another language from scratch. NEAR, for example, is a popular protocol that’s set up so developers can write smart contracts right in JavaScript or Rust, Kenny says. “You can get really far just with JavaScript, and then kind of branch into those other languages depending on what your goals are and what chain you want to work in,” he says.
Clarity
This newer smart contract language is specific to the Stacks blockchain and has a few distinctive features and guardrails that make it especially secure.
For starters, Clarity is decidable, which means there’s a finite number of steps for every input and you know where the code will terminate. Clarity doesn’t permit looping, and it’s purposefully “Turing incomplete,” so you can be certain that a program execution will end at some point, eliminating the risk of a halting problem — a valuable property to have in an immutable, globally-distributed system. The language also prohibits reentrancy, which is when one smart contract calls into another and then calls back into the first contract — a situation that can expose contracts to attacks.
Another reason why you should consider checking out Clarity? Kenny says there’s a hiring demand for Developers who know Clarity. “We’re at this weird point where there are not a lot of Clarity developers, so there’s kind of a shortage right now,” he says.
Go
Google’s statically-typed open-source language Go (or “Golang”) is often used for back-end development and creating high-performance applications. Geth, short for “Go-Ethereum,” is an Ethereum client that’s written in Go.
Compared to other languages, Go is fast and lean, and allows you to multitask running multiple processes without sacrificing memory resources. With Go, you can build applications from its robust library of functions and packages. Our course Learn Go is a beginner-friendly introduction to Google’s programming language, and will have you setting up a Go environment and creating a Go file right away.
Python
Lots of people are fans of Python’s English-like syntax and cross-platform versatility, and the general-purpose language can also be used for blockchain development. If you’ve never picked up Python before, we have lots of beginner-friendly Python courses to choose from, no matter what your goals are.
Ready to give blockchain development a chance? Try our free course Introduction to Blockchain and Crypto for a language-agnostic overview of the world of crypto and its underlying technology, built in partnership with Stacks Foundation.
Resource: Codecademy