mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make mixedCase the recommended naming style for constants
This commit is contained in:
parent
1acebf78ee
commit
fc743ac402
@ -8,6 +8,7 @@ Important Bugfixes:
|
|||||||
Language Features:
|
Language Features:
|
||||||
* Allow qualified access to events from other contracts.
|
* Allow qualified access to events from other contracts.
|
||||||
* Relax restrictions on initialization of immutable variables. Reads and writes may now happen at any point at construction time outside of functions and modifiers. Explicit initialization is no longer mandatory.
|
* Relax restrictions on initialization of immutable variables. Reads and writes may now happen at any point at construction time outside of functions and modifiers. Explicit initialization is no longer mandatory.
|
||||||
|
* Make mixedCase the recommended naming style for constants.
|
||||||
|
|
||||||
|
|
||||||
Compiler Features:
|
Compiler Features:
|
||||||
|
@ -1260,8 +1260,11 @@ Use mixedCase. Examples: ``totalSupply``, ``remainingSupply``, ``balancesOf``, `
|
|||||||
Constants
|
Constants
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Constants should be named with all capital letters with underscores separating
|
Constants should use mixedCase. Examples: ``maxBlocks``, ``tokenName``, ``tokenTicker``, ``contractVersion``.
|
||||||
words. Examples: ``MAX_BLOCKS``, ``TOKEN_NAME``, ``TOKEN_TICKER``, ``CONTRACT_VERSION``.
|
|
||||||
|
Names with all capital letters with underscores separating words are acceptable
|
||||||
|
only in legacy code and for implementing existing interfaces requiring this convention.
|
||||||
|
Examples: ``MAX_BLOCKS``, ``TOKEN_NAME``, ``TOKEN_TICKER``, ``CONTRACT_VERSION``.
|
||||||
|
|
||||||
|
|
||||||
Modifier Names
|
Modifier Names
|
||||||
|
Loading…
Reference in New Issue
Block a user