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:
“I consider criticism merely a preliminary excitement, a statement of things a writer has to clear up in his own head sometime or other, probably antecedent to writing; of no value unless it come to fruit in the created work later.”
—Ezra Pound (18851972)
“As far as criticism is concerned, we dont resent that unless it is absolutely biased, as it is in most cases.”
—John Vorster (19151983)
“The critic lives at second hand. He writes about. The poem, the novel, or the play must be given to him; criticism exists by the grace of other mens genius. By virtue of style, criticism can itself become literature. But usually this occurs only when the writer is acting as critic of his own work or as outrider to his own poetics, when the criticism of Coleridge is work in progress or that of T.S. Eliot propaganda.”
—George Steiner (b. 1929)