Hacker Newsnew | past | comments | ask | show | jobs | submit | jaapsen01's commentslogin

Edsger Dijkstra wrote an interesting article titled 'why numbering should start at 0'. Perhaps not answering the question directly but an interesting read nonetheless.

https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E...


As the article implies, Dijkstra was specifically wrong about FORTRAN, as defined at the time — the '77 standard, when it was still only conscionable to SHOUT 6 alphamerics.

“… you probably know that arrogance in computer science is measured in nano-Dijkstras.” — Alan Kay


"This quote keeps on showing up out of context." — Alan Kay https://news.ycombinator.com/item?id=11799963


Well, I did hear it in context, and have also heard him talking about concocting aphorisms. Kay also said “He did like to pull chains …”


I've never understood the first half of Dijkstra's argument. Unless we are programming a theoretical Turing machine, there will also be a maximum number that can be represented, so the argument about using inclusive bounds for the lower end also applies to the the upper end. So you can't represent all numbers with a single range style. You either end up excluding the smallest number, the largest number, or the empty set. Or you need special notation to handle one of those three cases.

I suppose the 0,1,infinity principle argues that including the empty set and smallest number is more important that including the largest number, so that notation should be preferred by default. And when writing using A<=i<B it is clear enough, but once you remove those symbols and start using them in indexing or function call syntax, like [A:B] or range(A,B), the inconsistency of bounds really breaks my brain, and having to pass a number larger than the largest array index as an upper index range bound gives me nervous ticks. I'd rather use inclusive bounds everywhere and have special syntax for empty set.


Sure but it’s much more common for a range to include 0 than INT_MAX


Interestingly, that Dijkstra article was originally published/circulated in handwritten form. It helps showcase the author's handwriting skills.

https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF


The handwriting skills were common back in the day... By the way, are you sure that it was Dijkstra himself who handprinted these texts (rather than have, say, his secretary do that)? Because this is not exactly the (beautiful) handwriting as it was taught back then.


He handwrote them, and occasionally typed them (especially early on, I gave up trying to find the transition point). It was something he was known for. If you read the EWD's over the years you'll see the same (or very similar) handwriting throughout, which would not be the case if he had a secretary writing them for him (who wouldn't have been the same person as he moved between countries).

https://en.wikipedia.org/wiki/Edsger_W._Dijkstra#EWD_manuscr...

https://www.cs.utexas.edu/~EWD/ - Pick random ones from different decades and you'll see very similar handwriting.

(Didn't read these, picked two at random):

2001 - https://www.cs.utexas.edu/~EWD/ewd13xx/EWD1307.PDF

1984 - https://www.cs.utexas.edu/~EWD/ewd09xx/EWD901.PDF


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: