Make mixedCase the recommended naming style for constants

This commit is contained in:
CodeSandwich 2023-07-18 22:11:14 +02:00
parent 1acebf78ee
commit fc743ac402
No known key found for this signature in database
GPG Key ID: 15E386807684821B
2 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,7 @@ Important Bugfixes:
Language Features:
* 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.
* Make mixedCase the recommended naming style for constants.
Compiler Features:

View File

@ -1260,8 +1260,11 @@ Use mixedCase. Examples: ``totalSupply``, ``remainingSupply``, ``balancesOf``, `
Constants
=========
Constants should be named with all capital letters with underscores separating
words. Examples: ``MAX_BLOCKS``, ``TOKEN_NAME``, ``TOKEN_TICKER``, ``CONTRACT_VERSION``.
Constants should use mixedCase. Examples: ``maxBlocks``, ``tokenName``, ``tokenTicker``, ``contractVersion``.
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