4 ms·
I started studying Solidity recently and found that code sharing and reuse is done through inheritance. What's the reasoning behind this? I thought we have a l
by Fire-Dragon-DoL 5y ago
I started studying Solidity recently and found that code sharing and reuse is done through inheritance.
What's the reasoning behind this? I thought we have a lot of documentation about inheritance being bad, but in Solidity not only this is core, but multiple inheritance is also core. This is then combined with (occasional) implicit access to permanently stored data, and with something that I can only describe as function inheritance.
While discovering this, I started having the thought that it was done on purpose (easy to find faulty contracts that could be hacked for money). This was a nasty thought, indeed, but I found a lot of anti-features.