GoTo is primitive & outside one’s control

Software ResiliencyProgramming Best Practices

Why you should care

The GOTO statement branches unconditionally to a statement label or block label. The label must be uniqe within its scope and precede an executable statement. The issues with GoTo however is its repetitive and superflous nature. It also enlongates the conceptual phase between the static prgram and the dynamic process which is not ideal for a programmer. The GoTo statement results in clauses that can create values outside of the programmer’s control which makes it hard to find a meaningful set of coordinates rendering it primitive in nature.

Business Impacts

GoTo is primitive making it risky to incorporate in current programs. It deliberately wastes time and creates uncontrollable variables on the technical side making it unproductive.

Production Risk
5362

How we detect

This code insight suggests to never use GoTo.

5362

About CAST and Highlight’s Code Insights

Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.

See featuresHow it works