This article was originally published at:
https://www.blog.duomly.com/which-programming-language-is-the-best-for-blockchain/
Blockchain because is secure, fast and decentralized (not always, but in most cases yes) is a technology that is coming to our world, business, life and enterprise really quick.
Thousands of blockchain projects are in development or are developed and deployed to the internet. Companies are looking for new blockchain ideas or trying to improve what other companies created now like crazy, and this is just the beginning of how blockchain technology is running the world.
For us, developers or people who would like to start working in the blockchain industry is like a dream. We can find a job immediately with a really high salary and good conditions. However, is one important question.
Which programming language is the best for blockchain?
In the blockchain development zone, we have a few most popular languages, they are Javascript, C#, C++, Python, Golang, Solidity, Java, and Rust.
Now I will try to explain to you the short description of every language, pros and disadvantages, the difficulty level of go into the language from scratch, and which blockchain project is using that language.
1. Javascript
Javascript is interpreted programming language defined as high-level.
What is most important for us javascript is prototype-based, dynamic and weakly typed and is one of the leading web technologies.
Javascript from a few years is very popular, and many companies are creating new frameworks for javascript like angular/react/vue/node.js which can help us developing code.
Pros
– Object-oriented
– Prototype-based
– Supports functional programming
– Very popular and almost every IT company need javascript with his frameworks
Disadvantages
– Dynamic
– Weakly typed (but we can use typescript to solve this problem)
Difficulty level
Javascript has a kind of low entrance difficulty level, and we don’t have to learn javascript really deep to work with it.
To start working with javascript, we need to learn basics and go more deeply later when we need that.
Helpful with javascript learning is the fact, on the internet are many materials with courses and tutorials, not only for pure javascript but for popular frameworks as well.
Where is used in the blockchain
The most popular place where is used is web3.js and ethereum.js which are helping us connect our frontend of application to connect with ethereum network and smart contracts.
The next popular way where developers use javascript is Hyperledger Fabric SDK for node.js it is the huge framework used very often in big companies and corporations so if you like this way of work it could be a good option for you.
One more popular blockchain where you could use javascript to work with contracts is NEO, a very fast blockchain that can handle even a few thousands of transactions per second.
Less famous but still very often javascript using case are lighting apps, which is a super-fast network built on top of the bitcoin blockchain and the second one which I would like to mention is the Raiden network which is high-speed infrastructure based on top of the ethereum blockchain.
2. C#
C# is a high-level, compiled, objected oriented programming language created in the late 90’s — the early ’00s for Microsoft.
It’s very similar language to Java or C++, similar to Java C++ code is a collection of classes and using inheritance.
Pros
– Support for .NET
– Kind of easy to learn
– Very popular
– Object-oriented
– Strongly typed
– Dynamic code support
Disadvantages
– Not so much support for Linux
– Windows-oriented way
Difficulty level
For me, it was a more difficult language to learn than javascript because syntax and the types, but it is not a that difficult and complicated language like for example Go.
Additionally, tons of good and free learning sources are making this language one of the easiest to learn.
Where is used
C# is used in a few popular blockchain projects, one of the most popular is NEO which is named Chinese version of Ethereum.
Neo is a high-speed Blockchain platform, which can handle even a few thousands of transactions per second.
The next popular project where we use C# is IOTA, which is a highly scalable and zero-fee transactions tangle type project which is oriented on the Internet of Things.
3. C++
C++ is strongly static typed, high-speed, object-oriented, compiled language.
Essential is a fact C++ has high-level efficiency and access to hardware.
What is interesting C++ was created in ’70–’80s an extension to C.
Pros
– Independent and multiplatform
– High-speed
– Similiar to C
– Strongly static types
Disadvantages
-Code redundancy
-Not so easy to learn
-Complex and sometimes difficult to debug
-Doesn’t support garbage collection
Difficulty level
C++ because its more complicated is more challenging to learn than C when C is at least medium / hard to learn.
It’s definitely not an easy language for beginners.
Where is used
C++ is used in a lot of popular blockchain cryptocurrencies and important blockchain projects like:
– Bitcoin (most famous cryptocurrency)
– Ripple (centralized ultra-fast currency)
– Bitcoin cash (cryptocurrency)
– Litecoin (cryptocurrency)
– Monero (cryptocurrency)
– Eos (fast blockchain network with own cryptocurrency named EOS)
– Stellar (payment network, one of the founders is the creator of eDonkey)
– QTUM (kind of hybrid between ethereum and bitcoin)
– Cpp-ethereum (C++ implementation of ethereum)
4. Python
Trendy high-level, dynamically typed programming language.
Python supports object-oriented and functional programming.
This language is coming more popular than it was before. Python is an excellent language to develop machine learning and artificial intelligence features.
IT giants support Python by creating smart tools and frameworks like dialogflow or TensorFlow.
Python is one of the most often selecting languages for creating chatbots.
Pros
– Very easy to learn
– A lot of premade libraries and frameworks like Django or Tensorflow
– Fast
Disadvantages
– Mostly used as a server language
– Not so smart context
– Libraries aren’t always documented in enough way
Difficulty level
Python is very popular and very often selected as a first programming language.
The Internet contains a massive amount of tutorials and courses, which is making Python one of the easiest programming languages to learn.
Where is used
In the blockchain industry Python is used in many good projects, for example, it has its own implementation of Ethereum(pyethereum), we can use it to create contracts for NEO and smartcontracts for Hyperledger as well.
One more thing that I would like to mention is steempython. It’s pythons implementation for steemit, trendy kind of social media — content providing ecosystem.
5. Golang
Go is statically typed, compiled programming language created by Google employees.
The first idea was, Go should contain a mix of easy developing code like Python and the efficiency of compiled languages like C++.
Pros
– Memory safety
– Garbage collection
– Super strongly typed
– Ultra-fast
– Very easy to develop, after you learn it
– Scalable
Disadvantages
– Not very easy to learn
– Very young language, so the community is not that big
– Not that many packages like for example python or javascript
– For some devs, the syntax is not clear and ugly
Difficulty level
Go doesn’t have that many good tutorials on the internet like javascript which can attack you from every place and people have to look more deeply to find something, and is complicated language, so Go has the opinion of very difficult to learn.
However, this opinion is sent very often from people who are python/javascript developers, because go is different from these languages very much.
Anyway if you’re coming from C++ or Java, learning Go should be very easy for you.
Where is used
We could talk about Golang related projects without end, but I will try to describe the most popular ones.
One of the most important projects for GO is Go-Ethereum which is written in golang.
The next important project which is written in Go is Hyperledger Fabric, one of the most popular blockchain solutions for big companies.
Exciting project targeting decentralized online games Loom Network has written a chain in Go as well. The less popular project which uses blockchains is Btcd, its bitcoing implementation written in Go, next is Gochain, fast ethereum compatible blockchain written in Go.
Moreover, the last one written in the Golang project which I would like to mention is fast, targeting the privacy of smart contracts blockchain named Dero.
6. Solidity
Contract-oriented statically typed language created by Ethereum developers.
Created for EVM, as smart-contract development main language and is the primary language for Ethereum’s smart contracts.
Pros
– Statically typed
– Very easy to learn
– Popularity is growing very fast
Disadvantages
– Very young
– The community is not big yet, so support is smaller
– Not universal (usable in Ethereum ecosystem)
– Very vulnerable
– Make critical mistake is very easy, so always we have to test our code in a very detailed way
Difficulty level
Solidity is not a complicated language and is a bit like much smaller javascript copy with a few changes like types(we use types in typescript which is used very often in javascript’s projects).
So middle experienced javascript developer can learn solidity in a few days, especially when we have a lot of interactive tutorials like duomly.com.
Where is used
We will use the solidity language to develop Ethereum smartcontracts.
I didn’t see other projects which use solidity, but the Ethereum development ecosystem is enormous and is one of the most significant parts of blockchain development now, so solidity is one of the most popular languages used in the blockchain industry.
7. Java
Java is compiled, strongly typed object and class-based programming language created by Sun Microsystems.
Java is very much oriented for object programming and is very popular in big companies.
Pros
– Independent from the operational system
– Strongly typed
– Strong support for Object-Oriented Programming
– Big community and libraries collection
– Easier in development than languages like C or C++
– No problem with the allocation of memory
– Easy memory cleaning
Disadvantages
– Need Java Virtual Machine to run
– Slower than C++ or Go
Difficulty level
We can compare the difficulty level to C#, which could be more difficult than javascript or python, is more complicated, but is a very popular language and are tons of learning resources.
Still can plainly tell, Java is easier than Golang or C++.
Where is used
Java is very popular in the blockchain industry, from more popular is used in IOTA (I described what is IOTA in C# step). Popular P2P cryptocurrency and platform named NEM are using Java as well (NEM is written in Java).
Rest of popular projects where we can use Java are:
– Neo’s contracts
– Hyperledger’s contracts
– IBM blockchain
– BitcoinJ (bitcoin’s implementation in Java)
– Ethereum
8. Rust
A system, compiled, strongly typed programming language, from 2009 Mozilla is taking care of development and sponsoring Rust.
Rust’s syntax is similar to C++.
Pros
– Strongly typed
– Safety oriented language
– Supporting functional paradigms
– Fast like C++
– Inheritance based on features
– Small running environment
Disadvantages
– Very difficult to learn
– Not so famous, so the community is not that big, like for example javascript, access to libraries is smaller, and developers have to rewrite many problems from scratch
– Doesn’t have such clear standard ways of accessing databases
Difficulty level
Rust’s syntax is similar to C++, so this programming language is definitely not easy to learn.
Additionally, the community is much smaller so I would tell the entrance level is high, and I can qualify difficulty as hard.
Where is used
Few really popular blockchain projects are using Rust.
One of them is Parity, a very fast and secure ethereum client which is written in Rust.
The next one and probably the most popular is Ethereum Classic, and it’s a cryptocurrency which born after a big hack on Ethereum.
The last one is written in Rust Exonum, Exonum is a blockchain security-oriented framework that can handle even a few thousands of transactions per second.
Summary (Winners)
The biggest amount of job offers in the blockchain industry
Blockchain Javascript — 565 job offers
Blockchain Solidity — 424 job offers
Blockchain Python — 394 job offers
Blockchain Go — 361 job offers
Blockchain C# — 301 job offers
Blockchain C++ — 301 job offers
Blockchain Java — 289 job offers
Blockchain Rust — 54 job offers
Winner: Javascript
The best-paid job offers
To get the best-paid job offers we took a range higher than $150k per year, and we will order by the number of job offers with that technology.
The results are below.
Blockchain Javascript — 89 job offers
Blockchain Go — 81 job offers
Blockchain Solidity — 77 job offers
Blockchain Python: 71 job offers
Blockchain C# — 61 job offers
Blockchain C++ — 61 job offers
Blockchain Java — 52 job offers
Blockchain Rust — 14 job offers
Winner: Javascript
Easy to learn
Of course, learning is an individual thing, but programming languages are more or less complicated, have more or less learning sources on the internet, so I decided to base on my personal experience and internet statistics.
After research in statistics of the difficulty of programming languages and base on my exp I Can order them as below:
Solidity
Python
Javascript
Java / C#
C++
Go
Rust
Winner: Solidity
General
After checking all the points, we can type a general winner.
Because Javascript is used every time in the frontend of apps, not rarely on backend and middleware has the most significant amount of job offers generally and has the most significant amount of well-paid job offers as well.
It is not so tricky for learning and in combination with solidity is a great combo. For sure, until dApps won’t lose popularity.
Winner: Javascript and solidity.
However, if you will check my rankings all of the languages have a lot of job offers and many job offers with an excellent salary.
So for us differences in the number of job offers and difficulty are that small, so we can tell you, with everyone from these languages you can find an excellent job, quickly.
Top comments (41)
The design of the pictures is on point, but the content is just lacking..
I don't think this is a language-specific shortcoming. Redundancy can be found in code-bases regardless of the language.
It's actually the slowest language in the list
Rust does not have inheritance. It has composition though!
Mostly used as a server language
Why is this a con for python?
I wouldn't say Go is difficult to learn. You can pick up the basics in an hour. It's easier to learn than Java or C++ for example. And with Blockchain it's even easier as you avoid using goroutines most of the time because you want determinism.
I would argue "easier than" can be subjective, I find the syntax of go disgusting. Making it harder for me to read it than Java.
Thank you for sharing.
I'm not an expert in blockchain but about C# it supports cross platforms since years via Dotnet Core.
dotnet.microsoft.com/download
True, I even use c# and last days tried to do q# on mac and it's possible. Anyway, I feel it's designed to be windows-oriented in the biggest part.
C# was born to be used in Windows environment back to 00s but dude, it has been almost 20 years, C# language has evolved and now it runs in several Linux distributions in big companies. You cannot share wrong perceptions of a languages based on a feeling. Please stick with the facts and update this article. Also, there's no such thing as Go being difficult to learn. It is much easier than many programming languages. Anyway I appreciate the comparisons done here
Note during the days of .NET Framework, C# supported by Microsoft was Windows-only, however, many companies and projects leverage Mono - an implementation of .NET - to run C# cross-platform e.g. Xamarin, Unity etc.
But since 2015, C# has gone opensource, cross-platform and it is of high performance - check the various performance benchmarks.
The only portion of .NET Core that is "Windows-oriented" would be for desktop development. Core has great Linux support. I host all my .NET Core services, APIs and web apps on Linux servers.
I hear a lot about blockchain nowadays, I don't understand it but after reading this article I kinda feel interested. Any suggestions on where I could start? I'm a fullstack web dev, so I'm very familiar with JS, TS and NodeJS
You should give Cryptozombies a try as it's free and very funny to learn! After accomplishing it, you will understand how Blockchain works under the hood, how Solidity works and how to integrate it in JavaScript projects. I had a huge fun doing the first level!
Yes! Doing solidity basics through crypto zombies are super cool!
But crypto zombies eat crypto kitties :(
We have some content related to solidity and ethereum on Duomly for free. But for general blockchain-around content, I was starting from books like "Mastering Blockchain".
There is a limited time free course here: bitdegree.org/course/learn-solidit...
Hi Mydrax,
Check this guy at youtube: youtube.com/channel/UCY0xL8V6NzzFc...
Hope you will pick up some basics.
Cheers
Javascript... really???
The wrong tool for the job is the best I can say.
In my opiniom, measuring what is the best language by using the number of job offers or its popularity is not a good way to go.
The merit for the best language to use should be on the technical side, its concurrency and parallel model, and how fault tolerant it is(thinking Elixir here).
And despite not being a Golang fan, I would put it on the top of the easiest languages to learn.
Well I don't know Solidity, so no comment on it, but in my opinion the winner should be one of, without order of preference, Rust, Golang, Python or even Elixir/Erlang(not evaluated in this article).
I have been using Golang for just under 2 years now. My first encounter with the language was on a Blockchain project. We started with JavaScript and mid-way, ditched JavaScript for Go. I have never looked back. It was way easier to learn, compared to even JavaScript. Why? The language syntax is pretty clear. Minimal syntactic sugar that change the meaning of expressions that should otherwise be clear.
Well done, thank you for sharing it! Didn't expect JS to be a winner in the blockchain stuff, to be honest. But it's probably the most popular programming language now, so it should be easier to find JS devs. Kinda make sense.
change topic to "Which programming language is the best for web development?" the content will hold up. Change topic to "Which programming language is the best for framework development?" The content will hold up again. I think, there is nothing about blockchains but a lot of language comparison. I was hoping for solid practice based facts, but instead I found highly abstracted common patterns where you can change topic to anything and it will hold
Lovely summary, and clear.
I got a noob question though: I was used to code in javascript years ago for embedding scripts into html pages. According to you would it be easier (=faster) for me starting again with JS or giving a try to Python (as I'm curious to use it...)?
As Web developer I'm thinking like JS would be better since I can upload the working file into some free webspace and python isn't available in free webspaces. Is this assume correct?
Thank you! :)