Learn Solidity | Introduction
Explore Solidity from a professional developer
Welcome to the new series! 😎
We all know that Solidity
is the most popular smart contract language in the Blockchain ecosystem, especially for EVM chains.
As a beginner, many people might see Solidity
as Javascript
in their initial journey. But, let me alert you that actually, it’s not fully true. Well, the language is mostly inspired from C/C++
. And this is the reason primarily that many programmers/coders might take a step back later while writing core-level smart contracts.
Comparison with C/C++
- Variable type declaration is a must in
Solidity
. - Automatic variable initialization during contract deployment.
- Supports Object-Oriented Programming (OOP).
- Compiled to bytecode in
Solidity
like binary code inC/C++
. - Supports almost all the variable types of C/C++ & more like
uint
,int
(of varying bits),bytes
(of varying size)etc. - Unlike EOSIO C/C++ (earlier version
v2.0
), EVM’sSolidity
does support contract methods, which can return values.
Limitations
- In
Solidity
, while usingfor-loop
, the max iteration recommended is 256. After which it might exceed the ‘gas limit per block’. - There are very limited types of storage containers like
mapping
,array
,struct
.
Summary
In this series, one would get to experience some core functionalities of Solidity. I would also try to give a comparo with other Blockchain protocol’s smart contract language.
Thanks a lot for your patience 🙏