Underhanded Solidity Coding Contest
It sure makes me wonder if Ethereum would do better with a less forgiving programming language. The fact that the syntax resembles Javascript is not reassuring, neither is the fact that the very first code snippet in &quot;Solidity By Example&quot; [1] is littered with comments like this:<p><pre><code>        &#x2F;&#x2F; Forward the delegation as long as
        &#x2F;&#x2F; `to` also delegated.
        &#x2F;&#x2F; In general, such loops are very dangerous,
        &#x2F;&#x2F; because if they run too long, they might
        &#x2F;&#x2F; need more gas than is available in a block.
        &#x2F;&#x2F; In this case, the delegation will not be executed,
        &#x2F;&#x2F; but in other situations, such loops might
        &#x2F;&#x2F; cause a contract to get &quot;stuck&quot; completely.
</code></pre>
[1]: <a href="https:&#x2F;&#x2F;solidity.readthedocs.io&#x2F;en&#x2F;develop&#x2F;solidity-by-example.html" rel="nofollow">https:&#x2F;&#x2F;solidity.readthedocs.io&#x2F;en&#x2F;develop&#x2F;solidity-by-examp...</a><p>In general, the easier the code is to read and the harder it is to write, the better. (Force the programmer to think carefully, not the reader!) Anything that gets a comment like that in the Solidity examples should at the very least refuse to compile without the programmer adding some attention-grabbing _UNSAFE annotation. Better, there should be mechanisms to make sure the code is written in a way that everyone understands the consequences of e.g. running out of gas in the middle of a function.