What is Solidity
Learn what a Smart Contract is
Our objective throughout this course is to learn how to define the code required to implement a smart contract that matches our intent. The previous section, furthermore, told us that all smart contracts are defined by their state and their behaviors. Therefore, we claim the following:
Solidity is a high-level programming language which allows us to define both the state and behaviors of a smart contract.
Although these behaviors can be almost anything, the majority of the time, such behaviors manipulate the state of the contract.
Solidity v.s. Other Programming Languages
The first question one might have when learning a new language is the following: what does the language even look like? To start, we consider the following code snippet:
In the above, we have a contract named A. Furthermore, we see that A contains a function getOne() that, when called, returns 1. Even though you might not understand everything that is going on in the code snippet, web developers may realize that the code snippet looks similar to JavaScript. The Solidity syntax, as a matter of fact, is actually inspired by JavaScript, and is a testament to the fact that Solidity itself is a high-level programming language.
Now that we have an idea of what both Solidity allows us to do and what the actually syntax of Solidity looks like, its time to learn the actual language itself.