I'm reading solidity document and cannot understand the meaning of "address: equivalent to uint160, except for the assumed interpretation and language typing." in the doc
Does anyone know what is the exactly meaning? Thanks in advance!
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
uint160 is the shortest unsigned integer which can hold 20 bytes of information - Ethereum addresses are 20 bytes in hexadecimal format. So you can convert an Ethereum address directly into uint160 and back.
What the latter part of the sentence says is that the address word has also a special meaning: it's a reserved keyword which implies an address used within the Ethereum network. And uint160 doesn't have any implied information except that it's an unsigned integer number. An address also have some special handling in Solidity, for example you can't give a function uint160 and implicitly cast it into an address - the cast has to be explicit.
Furthermore the uint160 equivalence can be used if you need to convert from address to address payable (https://solidity.readthedocs.io/en/v0.5.0/050-breaking-changes.html#explicitness-requirements).