mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5757 from fulldecent/feature-latest-version
Recommend to use latest version
This commit is contained in:
commit
e63aa03791
@ -19,6 +19,8 @@ that run on the Ethereum Virtual Machine. Smart contracts are programs that are
|
||||
network where nobody has special authority over the execution and thus they allow to implement tokens of value,
|
||||
ownership, voting and other kinds of logics.
|
||||
|
||||
When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly. We currently use a 0.x version number [to indicate this fast pace of change](https://semver.org/#spec-item-4).
|
||||
|
||||
## Build and Install
|
||||
|
||||
Instructions about how to build and install the Solidity compiler can be found in the [Solidity documentation](https://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source)
|
||||
@ -29,7 +31,7 @@ Instructions about how to build and install the Solidity compiler can be found i
|
||||
A "Hello World" program in Solidity is of even less use than in other languages, but still:
|
||||
|
||||
```
|
||||
pragma solidity ^0.4.16;
|
||||
pragma solidity ^0.5.0;
|
||||
|
||||
contract HelloWorld {
|
||||
function helloWorld() external pure returns (string memory) {
|
||||
|
@ -19,6 +19,8 @@ user-defined types among other features.
|
||||
With Solidity you can create contracts for uses such as voting, crowdfunding, blind auctions,
|
||||
and multi-signature wallets.
|
||||
|
||||
When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly. We currently use a 0.x version number [to indicate this fast pace of change](https://semver.org/#spec-item-4).
|
||||
|
||||
Language Documentation
|
||||
----------------------
|
||||
|
||||
|
@ -37,12 +37,12 @@ breaking changes, those releases will always have versions of the form
|
||||
|
||||
The version pragma is used as follows::
|
||||
|
||||
pragma solidity ^0.4.0;
|
||||
pragma solidity ^0.5.2;
|
||||
|
||||
Such a source file will not compile with a compiler earlier than version 0.4.0
|
||||
and it will also not work on a compiler starting from version 0.5.0 (this
|
||||
Such a source file will not compile with a compiler earlier than version 0.5.2
|
||||
and it will also not work on a compiler starting from version 0.6.0 (this
|
||||
second condition is added by using ``^``). The idea behind this is that
|
||||
there will be no breaking changes until version ``0.5.0``, so we can always
|
||||
there will be no breaking changes until version ``0.6.0``, so we can always
|
||||
be sure that our code will compile the way we intended it to. We do not fix
|
||||
the exact version of the compiler, so that bugfix releases are still possible.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user