2 ms·
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
by adrian_b 1y ago
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.