Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And Dijkstras argument is actually quite weak if you read carefully. But he has a certain way of writing which make it seem almost like a mathematical proof. And then he sprinkles some “only smart people agree with me” nerd baiting.


This is a matter of opinion. I consider Dijkstra's arguments quite strong.

Some decades ago, I have disassembled and studied Microsoft's Fortran compiler.

The fact that Fortran uses 1-based indexing caused a lot of unnecessary complications in that compiler. After seeing firsthand the problems caused by 1-based indexing I have no doubt that Dijkstra was right. Yes, the compiler could handle perfectly fine 1-based indexing, but there really was no reason for all that effort, which should have been better spent on features providing a serious advantage for the programmer.

The use of 1-based indexing and/or closed intervals, instead of consistently using only 0-based indexing and half-open intervals, are likely to be the cause of most off-by-one errors.




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

Search: