3.23 Keywords
This security best practice is related to the use of duplicated keywords in Solidity
over the different compiler versions.
Different keywords have been deprecated to favor one over the other, so for example msg.gas
has been deprecated to favor msg.gasLeft
, throw
has been deprecated to favor the use of revert
, sha3
for keccak-256
, callcode
for delegatecall
, constant
Keyword for view
, the var
Keyword for using the actual type name instead.
So all such deprecated keywords they start initially as compiler warnings where the compiler wants us not to use these keywords and over the future versions these warnings could be converted into compiler errors in which case the compilation fails.
So the best practice here is to simply avoid the use of deprecated keywords even if they are compiling warnings, because these warnings can become errors in the future compiler versions.
Last updated