Criticism
It has been argued that one should eschew the use of the explicit return statement except at the textual end of a subroutine, considering that, when it is used to "return early", it may suffer from the same sort of readability problems that are claimed to exist for the GOTO statement. For instance, that in later development, a return statement could be overlooked by a developer, and an action which should be performed at the end of a subroutine (e.g.: a trace statement) might not be performed in all cases. Conversely, it can be argued that using the return statement is worthwhile when the alternative is more convoluted code, harming readability. Languages without a return statement, such as standard Pascal don't have this readability problem.
Some early implementations of languages such as the original Pascal and C restricted the types that can be returned by a function (e.g. not supporting record or struct types) to simplify their compilers.
Read more about this topic: Return Statement
Famous quotes containing the word criticism:
“Cubism had been an analysis of the object and an attempt to put it before us in its totality; both as analysis and as synthesis, it was a criticism of appearance. Surrealism transmuted the object, and suddenly a canvas became an apparition: a new figuration, a real transfiguration.”
—Octavio Paz (b. 1914)
“Parents sometimes feel that if they dont criticize their child, their child will never learn. Criticism doesnt make people want to change; it makes them defensive.”
—Laurence Steinberg (20th century)
“As far as criticism is concerned, we dont resent that unless it is absolutely biased, as it is in most cases.”
—John Vorster (19151983)