David Tribble

david.tribble.com · Personal blog · on HN since 2009

David Tribble, a programmer, publishes technical essays, including a retrospective on Dijkstra's goto letter and C/C++ incompatibilities.

What HN saysHN commenters call his goto retrospective the best modern analysis of Dijkstra's letter, and describe him as a classic Usenet stickler for detail.
19HN people shared it
11linked it in comments
9stories submitted
34story points
4 months agolast shared
2009people per year2026

Most-shared posts

  1. 1
    Go To Statement Considered Harmful: A Retrospective
    14 people · 29 points · first shared 2009 · 23 comments on HN
  2. 2
    Incompatibilities Between ISO C and ISO C++
    4 people · 5 points · first shared 2010 · 1 comments on HN
  3. 3
    Letters
    1 people · first shared 2010

What HN people wrote when they linked it

GrumpyYoungMan · 2021-10-21
> "The issue I think is that people today read "GOTO Considered Harmful" without really understanding the world at the time. ... Just because it was a bad idea to do everything with a GOTO 60 years ago shouldn't mean don't do some things with goto today." Every time this comes up, I always encourage people to read an excellent analysis by David Tribble "Go To Statement Considered Harmful: A Retrospective" that goes over Dijkstra's essay line by line and explains what it means in a more modern context: http://david.tribble.com/text/goto.html It really should be required reading in CS programs. I've used and still use goto in the few niches it makes sense to, primarily error handling and multi-level break in C/C++.
RandomOpinion · 2016-10-02
The best modern analysis of Dijkstra's original letter I've seen is is David Tribble's "Go To Statement Considered Harmful: A Retrospective" which dissects it line by line and explains it in the historical context in which Dijkstra wrote it. http://david.tribble.com/text/goto.html
mahmud · 2010-05-04
Tribble is an uber geek, marvel at his output: http://david.tribble.com/letters.html A classic USENETer, and an stickler for minute truths.
thaumaturgy · 2014-09-23
The most interesting thing about this thread (and the one on Github) is that so many programmers are now incapable of discerning between good use of goto, and bad use of goto. "goto is bad" has become a hard-line rule that programmers follow now without question or consideration. Here's the current version of the retry function: function retry($retries, callable $fn) { beginning: try { return $fn(); } catch (\Exception $e) { if (!$retries) { throw new FailingTooHardException('', 0, $e); } $retries--; goto beginning; } } Now, throw out everything you know about gotos for a moment, and really look at the code. Is it unreadable? Hard to understand? Does it do anything wrong other than violate the hard rule, "thou shalt not goto"? And if gotos are inherently, irredeemably evil, then why do we use switch statements? Because each case label in a switch statement is a goto. Dijsktra in his original letter condemned the "unbridled" use of gotos. At that time, there was -- according to Dijsktra -- a growing trend in programming, where gotos were used to jump from one area of a program to the next, and into and out of loops, making the program flow very difficult to follow. (A good review of Dijsktra's "Goto considered harmful" is at http://david.tribble.com/text/goto.html .) Dijsktra proposed abolishing goto altogether as a knee-jerk reaction to the habits of…
reificator · 2018-05-28
This comment contains more snark than content, but I'll reply anyway: Goto is considered harmful, but it's important to recognize the context of that decision rather than parroting the idea. It's not an obvious idea and if the discussion had happened today with modern languages[0] instead it's not at all obvious the same conclusions would be reached. This write-up does a pretty fair job of translating the original paper to something more modern without a lot of bias. http://david.tribble.com/text/goto.html [0]: Modern languages of course learned from this paper, so that's not a fair comparison. In fact golang contains a goto, but it behaves well according to Dijkstra's concerns and occasionally results in more readable code. I would be shocked if Dijkstra took any issue with go's implementation.
clock_tower · 2016-10-27
But see Djikstra on "GOTO statement considered harmful" (http://david.tribble.com/text/goto.html). The problem is unstructured control flow, which both GOTOs and exceptions-as-control-flow give you; at least in what I was taught (early-2000s CS degree focused on C++), unstructured flow of control is only acceptable when it's a panic button to quit the program (or a major area of processing). It sounds like the Web way of doing things doesn't have this tradition -- much like how it doesn't have static strict extensible type systems.
rpcope1 · 2015-04-15
Modern, extremely popular compilers may not even support C89 features yet... Citation needed please. Also, because C is not a true subset of C++, it has seemed that many big C projects will not compile on C++ compilers because of corner cases, so this may be something to watch for. Much of the incompatibility rises from additions in C99. References: (http://www.geeksforgeeks.org/write-c-program-wont-compiler-c/, http://david.tribble.com/text/cdiffs.htm#C90-vs-CPP98)
Jach · 2013-11-10
Incompatibilities Between ISO C and ISO C++: http://david.tribble.com/text/cdiffs.htm
Nycto · 2009-06-30
I, and probably a lot of other developers, have an immediate, negative, visceral reaction to "gotos". The reason is simple: If a language provides the appropriate control structures, gotos aren't needed. They will only make your code soupy. In my opinion, if you find yourself using a goto, you should be seriously reconsidering your design. This article was posted a little while ago, and I thought it gave a very good, non-partisan account of gotos: http://david.tribble.com/text/goto.html
jdp · 2009-06-09
Why is everyone jumping on this as a negative? Goto isn't inherently evil. Of course in most cases there is a construct that would be a better fit than goto, but it does have its uses. As far as readability goes, odds are a programmer isn't going to be jumping to a label 300 lines up, its used mostly to break out of nested loops and to simulate stuff like state machines. Check out http://david.tribble.com/text/goto.html
rramadass · 2026-06-25
There is a lot of misconceptions with people's understanding of Dijkstra's views on goto; simply because few read his original writings. Read David Tribble's Go To Statement Considered Harmful: A Retrospective which annotates the original paper with historical details for better understanding - http://david.tribble.com/text/goto.html This is a discussion and analysis of the letter sent to Communications of the Association for Computing Machinery (CACM) in 1968 by Edsger W. Dijkstra, in which he calls for abolishing the goto statement in programming languages. The letter has become quite famous (or infamous, depending on your feelings about goto statements) in the 40 years since it was first published, and is probably the most often cited document about any topic of programming. It is also probably the least read document in all of programming lore. Most programmers have heard the adage "Never use goto statements", but few of today's computer science students have the benefit of the historical context in which Dijkstra made his declaration against them. Modern programming dogma has embraced the myth that the goto statement is evil, but it is enlightening to read the original tract and realize that this dogmatic belief entirely misses the point. This paper was written at a time when the accepted way of programming was to code iterative loops, if-thens, and other control structures by hand using goto statements. Most programming languages of the time did not support the…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close