Essential complexity: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Dubious}}
Line 12:
{{main|Cyclomatic complexity}}
 
'''Essential complexity''' is also used with a different meaning in connection with [[cyclomatic complexity]]. In this context, essential complexity refers to the cyclomatic complexity after iteratively replacing all well structured control structures with a single statement. Structures such as if-then-else and while loops are considered well structured and then do not increase the essential cyclomatic complexity. Unconstrained use of goto, break and continue statements can produce programs which can not be reduced in this way.{{Dubious|Cyclomatic complexity section is unrelated to the rest of the article.|date=June 2014}}
 
However, the [[structured program theorem]] proves that goto is '''never''' necessary; any program including goto can be re-written as an equivalent program that does not contain goto. Hence, this sense of essential complexity is not essential.