HomeWikiDApps & Smart ContractsHow to use Solidity from Ethereum

How to use Solidity from Ethereum

To develop dApps, token games or any project on the blockchain, you need a programming language. As far as the most prominent and used of the blockchains, Ethereum, is concerned, Solidity is the main language used for programming Smart Contracts on Ethereum.

The limitations of the Ethereum programming language: Solidity

Unlike more popular languages such as Java, Solidity has limitations caused by the blockchain. Large amounts of data cannot be stored in variables. Computation is also limited by the use of gas.  It is a language designed specifically to take advantage of the Ethereum Virtual Machine, the function of which is to allow the execution of programs or smart contracts.

It was created by the programmers of Ethereum with the aim of being able to give rise to smart contracts, which enable the development of each transaction on the blockchain and generate a chain of transaction records in the blockchain system. Like other programming languages, Solidity has variables, functions, classes, arithmetic operations, string manipulation and many other concepts.

Thanks to this programming language, which is the most versatile and used by users, Ethereum is still the blockchain favoured by most developers, although its transaction costs are still very high. Other programming languages such as Viper, LLL, Mutan Serpent and Simplicity are much less widely used.

Besides being the most widely used language, it is also the only one that is officially supported. The motivation for developing an ad-hoc language lies in the fact that it was designed specifically for use within smart contracts. 

A contract in the Solidity language would be like a kind of union of a code (the functions) and data (its state) located at a specific address on the Ethereum blockchain. Each contract contains declarations of state variables, functions, function modifiers, data structures and events.

The advantages of the Solidity language

One of the acknowledged advantages of this particular computer language is that the source code of programs made with it is publicly accessible from the Ethereum blockchain itself. Although it is in bytecode, it is possible to decompile it and obtain a fairly clear sample of the original source code.

This language also provides a number of very useful libraries that facilitate the programming of smart contracts, making the code reusable and easier to maintain.

In addition, the Solidity programming language and Ethereum’s EVM are said to be Turing complete, meaning that it can be used to simulate any Turing machine (devised by English mathematician and computer scientist Alan Turing). This means that this language is able to recognize or decide on other sets of data manipulation rules. 

Vincenzo Cacioppoli
Vincenzo Cacioppoli
Vincenzo was born in Genova but lived most of his life in Milan. He has a degree in political science. He is a journalist, blogger, writer, and marketing and digital advertising expert. After a long experience in traditional marketing, he started working with the web and digital advertising in 2011, creating a company called Le enfants. Passionate about the web and innovation, in 2018 he started exploring the topics related to blockchain technology and cryptocurrencies. Independent cryptocurrency trader since March 2018, he now collaborates with companies in the sector as a content marketing specialist. In his blog. mediateccando.blogspot.com, he has long been primarily focused on blockchain, which he considers to be the greatest technological innovation after the Internet. His first book about blockchain and fintech is scheduled for release in November.