Criticism
Jensen's device relies on call by name, but call by name is subtle and has some problems. Consequently, call by name is not available in most languages. Knuth comments that ALGOL 60 cannot express an increment(n) procedure that increases its argument by one; the call increment(A) does not do the expected action if i is a functional that changes with each access. Knuth says, "The use of 'macro' definition facilities to extend language, instead of relying solely on procedures for this purpose, results in a more satisfactory running program."
Others point out that a call by name procedure that swaps its argument can have subtle problems. An obvious swapping procedure is:
procedure swap(a, b) integer a, b; begin integer temp; temp := a; a := b; b := temp; end;The procedure does the right thing for many arguments, but the invocation of swap(i,A) is problematic. Using the Copy Rule leads to the assignments:
The problem is the second assignment changes i, so the A in the third assignment probably will not be the same array element as at the start. If on the other hand the procedure were to be coded the other way around (with b being saved to temp instead of a) then the desired action would result, unless it were invoked as swap(A,i)
Read more about this topic: Jensen's Device
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)
“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)
“The visual is sorely undervalued in modern scholarship. Art history has attained only a fraction of the conceptual sophistication of literary criticism.... Drunk with self-love, criticism has hugely overestimated the centrality of language to western culture. It has failed to see the electrifying sign language of images.”
—Camille Paglia (b. 1947)