The Solidity coding language is taking over a majority of the smart contract programming market. Its compatibility with Ethereum, the most used blockchain for launching and running self-executing agreements, makes it a top choice for developers.
Other programming languages have been designed for similar purposes. Most have declined in use. These include Serpent, LLL, Viper and Mutan.
First proposed in 2014, Solidity claims a first-mover advantage, the backing of a dev team with vast experience, as well as flexibility and ease of use. In particular, its syntax and character are similar to Javascript, a programming language popular among coders.
Why another language
Writing smart contracts, or agreements written in code that self-execute when predefined conditions are met, proved to be difficult using existing programming languages. They lacked features such as static typing, contracts treated as first-class entities, and the ability to return values with named components.
These gaps raised the need to design a new language. In a proposal document, Solidity lead designer and developer Gavin Wood outlined the technical inefficiencies that had to be overcome.
Wood is a co-founder and the CTO of the Ethereum project. Together with several others, he developed the Solidity language.
The Potential of Solidity
While Ethereum was proposed in 2013 and released two years later as an early blockchain project to complement Bitcoin, its primary application is not to create another digital currency, but creating and running smart contracts. Even while its native currency, ether, is the second most-traded cryptocurrency after bitcoin.
Through smart contracts, transactions can be automated and fast-tracked between individuals and businesses in almost any sector. This form of decentralized application also opens the possibility for robots driven by artificial intelligence to do businesses amongst themselves with little input from humans.
Insurance companies could set up claims to be triggered when a car is involved in an accident, for example, while sensors embedded in the car could deliver necessary data. And self-driven cars could transact with riders and transmit battery charging fees at service stations.
Why learn the language
With smart contracts being expected to increasingly drive interactions amongst people, businesses and machines, learning how to code such contracts is turning into a worthwhile pursuit.
But before learning how Solidity works, you’ll need at least general knowledge of blockchain and the basics of programming.
Resources and courses exist online to help you learn, practise and master the programming language. The majority are available for free.
Where to learn
The official website of the Ethereum foundation is one place where you can access fundamental learning tools. You’ll find an introductory tutorial and a browser on which to write, deploy and run your code.
There is also a GitHub page where you can follow developer contributions to the maintenance of the language’s core code.
Blockgeeks, a training platform for blockchain and decentralized applications, offers a detailed guide on the language. It is free to access and use. They offer more technical training if you are willing to sign up for a paid plan.
Further resources
The list of books that will help you learn the Solidity language is growing. On Amazon, more than ten books are listed on the topic. The most reviewed include Introducing Ethereum and Solidity, by Chris Dannen; Building Blockchain Projects, by Narayan Prusty; and Solidity Programming Essentials, by Ritesh Modi.
Courses available on YouTube can also serve as a foundation for your learning journey. One published in 27 parts is titled ‘Learning Solidity’. Each part is only about ten minutes long.
Other YouTube courses include:
- Developing Ethereum Smart Contracts for Beginners
- Ultimate Introduction to Ethereum Ðapp Development
- Building Ethereum Dapps Using Solidity
- Ethereum Smart Contracts in Solidity
- Solidity and Smart Contracts Tutorial for Beginners
You can also benefit from joining and participating in online forums where discussions on the technical aspects of the language take place. The most used forums include the Ethereum Developers Facebook group, Solidity Gitter and the Ethereum StackExchange.