語言的影響
Solidity 是一種花括號語言,它受到了幾種著名程式語言的影響和啟發。
Solidity 受 C++ 的影響最為深遠,但也借鑒了 Python、JavaScript 等語言的概念。
C++ 的影響體現在變數宣告的語法、for 迴圈、函數重載的概念、隱式和明確型別轉換以及許多其他細節。
In the early days of the language, Solidity used to be partly influenced by JavaScript.
This was due to function-level scoping of variables and the use of the keyword var.
The JavaScript influence was reduced starting from version 0.4.0.
Now, the main remaining similarity to JavaScript is that functions are defined using the keyword
function. Solidity also supports import syntax and semantics that
are similar to those available in JavaScript. Besides those points, Solidity looks like
most other curly-bracket languages and has no major JavaScript influence anymore.
Another influence to Solidity was Python. Solidity's modifiers were added trying to model
Python's decorators with a much more restricted functionality. Furthermore, multiple inheritance, C3 linearization,
and the super keyword are taken from Python as well as the general assignment and copy semantics of value
and reference types.