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 è genovese di nascita ma milanese di adozione. E' laureato in scienze politiche. E' un giornalista, blogger, scrittore, esperto di marketing e digital advertising. Dopo una lunga esperienza nel marketing tradizionale, comincia attività con il web e il digital advertising nel 2011 fondando una società Le enfants. Da sempre appassionato di web e innovazione, nel 2018 approfondisce le tematiche legate alla blockchain e alle criptovalute. Trader indipendente in criptovalute dal marzo 2018, collabora con aziende del settore come content marketing specialist. Nel suo blog. mediateccando.blogspot.com, da tempo si occupa soprattutto di blockchain, che considera come la più grande innovazione tecnologia dopo Internet. A novembre è prevista l'uscita del suo primo libro sulla blockchain e il fintech.
RELATED ARTICLES

MOST POPULARS

GoldBrick