Go to statement considered harmful. Author: Edsger W. Dijkstra, Technological University, Eindhoven, The Netherlands View colleagues of Edsger W. Dijkstra . “GOTO considered harmful” needs to be read in its historical context, where structured programming (for Thanks for posting Dijkstra answer. One of the comments did mention Dijkstra’s article Go to Statements Considered Harmful, but aside from that mention, there was much.

Author: Kazrazragore Shagami
Country: Bermuda
Language: English (Spanish)
Genre: Health and Food
Published (Last): 16 November 2006
Pages: 120
PDF File Size: 19.87 Mb
ePub File Size: 20.75 Mb
ISBN: 931-5-63451-215-9
Downloads: 23764
Price: Free* [*Free Regsitration Required]
Uploader: Nagal

The abuse of GOTO is, thankfully, a long forgotten memory in today’s modern programming languages. GOTO isn’t all badthough.

Andrew Koenig

It still has some relevance to today’s code. Along with many other programmers, I always recommend using guard clauses to avoid arrow codeand I also recommend exiting early gpto a loop as soon as you find the value you’re looking for. The publication of such an influential paper in this particular format led to an almost immediate snowclone effectas documented dijjstra Wikipedia:.

That’s easily one of the funniest things I’ve ever read in Wikipedia.

Considered harmful – Wikipedia

Who says computer scientists don’t have a sense of humor? But here’s what they might not know about it:. In other words, Wirth poked and prodded the content until it became incendiary, to maximize its impact. The phrase “considered harmful” was used quite intentionally, as documented on the always excellent Language Log:. I’m sure it’s not the earliest example of this phrase used in a headline or title, either — I chose it only as a convenient illustration of susage a couple of decades before the date of Dijkstra’s paper.

Note that this example is also in coonsidered title of a slightly cranky letter to the editor – it’s probably not an accident that the first example that came to hand of “considered harmful” in a pre-Dijkstra title was of this type.


So when you emulate the “considered harmful” style predicated on the work of these famous computer scientists inkeep that history in mind. You’re emulating a slightly cranky letter to the editor. It’s frighteningly common– there are now 28, web pages with the exact phrase “considered harmful” in the title.

He points out that choosing this style of dialogue is ultimately counterproductive:. If you have a point to make, by all means, write a great persuasive essay.

If you want to maximize the effectiveness of your criticisms, however, you’ll leave “considered harmful” out of your writing. The “considered harmful” technique may have worked for Wirth and Dijkstra, but unless you’re planning to become a world famous computer scientist like those guys, I’d suggest leaving it back in where it belongs.

For a number of years I have been familiar with the observation that the quality of programmers is a decreasing function of the density of go to statements in the programs they produce. More recently I discovered gogo the use of the go to statement has such disastrous effects, and I became convinced that the go to statement should be abolished from all “higher level” programming languages i.

Go To Statement Considered Harmful: A Retrospective

The publication of such an influential paper in this particular format led to an almost immediate snowclone effectas documented on Wikipedia: Dijkstra’s own response to this controversy was titled goo a somewhat disappointing correspondence”.

But here’s what they might not know about it: In order to speed up its publication, the paper was converted into a “Letter to the Editor”. The phrase “considered harmful” was used quite intentionally, as documented on the always excellent Language Log: However, “X considered harmful” was already a well-established journalistic cliche in — which is why Wirth chose it.


The illlustration below shows the headline of a letter to the New York Times published August 12, He points out that choosing this consideree of dialogue is ultimately counterproductive: There are three primary ways in which “Considered Harmful” essays cause harm. The writing of a “considered harmful” essay often serves to inflame whatever debate is in progress, and thus makes it that much harder for a solution to be found through any means. Those who support the view that the essay attacks are more likely to dig in and defend their views by any means necessary, and are less receptive to reasoned debate.

By pushing the opposing views further apart, it becomes more likely that the essay will cause a permanent break between opposing views rather than contribute to a resolution of the debate. The publication of a “considered harmful” essay has harmfu, strong tendency to alienate neutral parties, thus weakening support for the point of view the essay puts forth.

Considered harmful

A sufficiently dogmatic “considered harmful” essay can end a debate in favor of the viewpoint the essay considers harmful. They’ve become boring cliches.

Nobody really wants to read “considered harmful” essays any more, because we’ve seen them a thousand times before and didn’t really learn anything from them, since we were too busy being annoyed to really listen to the arguments presented.