git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[OT] if (4 < number_of_children) you're in trouble

From
Junio C Hamano <junkio@cox.net>
Date
May 28, 2005, 07:55 UTC
Message-ID
<7vfyw7yebj.fsf_-_@assigned-by-dhcp.cox.net>
In-Reply-To
<7v3bscqdlr.fsf@assigned-by-dhcp.cox.net>

I received this from my mentor tonight. Although I said I am not going to discuss this issue anymore, with his permission, I would like to share where the "visual order" came from with the list.

From: Paul Eggert <eggert@CS.UCLA.EDU>
Subject: Re: FYI: comparison order in boolean expressions
To: Junio C Hamano <junkio@cox.net>
Date: Sat, 28 May 2005 00:28:31 -0700
> http://marc.theaimsgroup.com/?l=git&m=111698274620068&w=2
Thanks!  That made my day.
You can forward the following to that mailing list if you like:

I learned the "textual order should reflect actual order" convention from D. Val Schorre, one of the best programmers I've ever worked with. Val was credited by Donald E. Knuth as the first person to seriously advocate goto-less programming. In 1974 Knuth wrote:

  When I met Schorre in 1963, he told me of his radical ideas, and I
  didn't believe they would work....  In 1964 I challenged him to
  write a program for the eight-queens problem without using go to
  statements, and he responded with a program using recursive
  procedures and Boolean variables, very much like the program later
  published independently by Wirth.
  I was still not convinced....

Knuth's reaction to Schorre's ideas on avoiding gotos sounds a bit like Linus's reaction to Schorre's ideas on comparison order, no?

Anyway, here's the reference, if you'd like to find out how Knuth's story ends:

  Donald E. Knuth
  Structured Programming with go to Statements
  ACM Computing Surveys 6, 4 (December 1974), 261-301.
  http://portal.acm.org/citation.cfm?id=356640

PS. The idea that textual form should reflect the underlying reality goes all the way back to Gottfried Leibniz's alphabet of human thought <http://en.wikipedia.org/wiki/Alphabet_of_human_thought>. Leibniz was a brilliant designer of notations -- one of the best the world has ever seen -- and it is amusing to speculate what he would have done with programming had he been born some time in the past few decades. (Personally I suspect that Leibniz would have liked "1 < x".)

Previous: Matthias UrlichsNext: Ingo Molnar
Message 15 of 17 in “diff-cache path restriction fix.”
  1. diff-cache path restriction fix.Junio C Hamano, May 25, 2005
  2. Linus TorvaldsMay 25, 2005
  3. Junio C HamanoMay 25, 2005
  4. Linus TorvaldsMay 25, 2005
  5. Junio C HamanoMay 25, 2005
  6. Russ AllberyMay 25, 2005
  7. Junio C HamanoMay 25, 2005
  8. Linus TorvaldsMay 25, 2005
  9. Junio C HamanoMay 25, 2005
  10. Ingo MolnarMay 25, 2005
  11. Linus TorvaldsMay 25, 2005
  12. Junio C HamanoMay 25, 2005
  13. Thomas GlanzmannMay 25, 2005
  14. Matthias UrlichsMay 25, 2005
  15. [OT] if (4 < number_of_children) you're in troubleJunio C Hamano, May 28, 2005
  16. Ingo MolnarMay 25, 2005
  17. Florian WeimerMay 25, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.