Arc Forumnew | comments | leaders | submitlogin
"Structured Programming with GOTO Statements" (Knuth) (ycombinator.com)
2 points by mofey 5120 days ago | 7 comments


2 points by akkartik 5118 days ago | link

One final, more personal, comment.

As a young grad student I had an extremely overblown writing style that it took several semesters to lose. Reading this I think I realize why. It's because we young grad students spend the first couple of semesters reading only the great papers of the last few decades. But the great papers were written by great people. Knuth was at the top of his field for at least a decade when he wrote this, so the reviewers wouldn't give two hoots that it contained the word "I" so many many times, or that he consumes paragraphs where a sentence might seem to do (and no it doesn't). Or consider Dijkstra's famous goto paper; some editor just said, "Oh Dijkstra, we don't need this reviewed, let's just call it a letter to the editor."

The lesson: model your writing style on not just the greats but the grunts. The odds are that you don't have the social standing to justify writing like the greats.

-----

1 point by akkartik 5118 days ago | link

There's so much new to me in this paper that I think I have never before finished it through to the end. There's a speculation on automatic program transformation systems, a pointer to proving properties of programs containing gotos, a complete exagesis on Quicksort, fascinating glimpses into Knuth's mad inner-loop optimization skillz.

Thanks again, mofey.

-----

1 point by akkartik 5118 days ago | link

Ah yes, it's the 'premature optimization is the root of all evil' paper.

http://c2.com/cgi/wiki?PrematureOptimization

-----

1 point by akkartik 5118 days ago | link

He elaborates on the idea in a section titled 'A confession' that is worth reading in isolation:

"My books emphasize efficiency because they deal with algorithms that are used repeatedly as building blocks in a large variety of applications. It is important to keep efficiency in its place, but when efficiency counts we should also know how to achieve it."

Now concerns of performance seque smoothly into those of ergonomics.

"To make it possible to derive quantitative assessments of efficiency my book uses MIXAL, a symbolic assembly language that explicitly corresponds one-for-one to machine language. There's a danger of placing too much emphasis on assembly, but I believe MIXAL is a good example of a 'quick and dirty assembler', a genre of software which will always be useful in its proper role: preparing programs for a new machine. I have implemented six such assemblers, for six different machines, and I'm glad to let MIXAL illustrate what one is like. But such languages should never be improved to the point where they are too easy or pleasant to use. I would never switch to a two-pass process, or add complex pseudo-ops, macro facilities, or even fancy error diagnostics. Nor would I maintain or distribute such a language as a standard programming tool."

"Now that the technology is available, we can condone unstructured languages only as a bootstrap-like means to a limited end."

-----

1 point by mofey 5119 days ago | link

I posted it on Hacker News and it didn't receive any comments, even though the content is very good. Maybe this forum is a better place for it?

-----

1 point by akkartik 5119 days ago | link

Yeah that's a great paper, I'm going to take this as a cosmic sign to reread it after 8 years. It's 41 pages though; may take me a few days to find something to say.

-----

1 point by akkartik 5118 days ago | link

Latex sources! Awesome.

ftp://linux.stanford.edu/pub/japan/goto1.tex

-----