Content deleted Content added
m unpiped links using script |
review: syntax hilighting. add link, clarification. |
||
Line 120:
Some languages exclude features that easily lead to bugs, at the expense of slower performance {{endash}} the principle being that it is usually better to write simpler, slower correct code than complicated, buggy code. For example, the [[Java (programming language)|Java]] does not support [[pointer (computer programming)|pointer]] arithmetic which is generally fast, but is considered dangerous; relatively likely to cause a major bug.
Some languages include features that add runtime overhead in order to prevent some bugs. For example, many languages include runtime [[bounds checking]] and a way to handle out-of-bounds conditions instead of crashing.
=== Techniques ===
Line 126:
Programming techniques such as [[programming style]] and [[defensive programming]] are intended to prevent typos.
For example, a bug may be caused by a relatively minor, [[typographical error
But this code always executes {{code|foo}}:
A convention that tends to prevent this particular issue is to require braces for a block even if it has just one line.
<syntaxhighlight lang="c">
foo();
}
</syntaxhighlight>
Enforcement of conventions may be manual (i.e. via [[code review]]) or via automated tools.<!--[[User:Kvng/RTH]]-->
=== Specification ===
|