News for hackers. Stuff that matters.
Re:“Dijkstra is Wrong and So am I” – an argument against 0-b... by nabla9 on Tuesday September 18, 2018 @03:01PM (#18018145)
Dijkstra is right and so were you once.

0 or 1 based arrays is not a fundamental issue. It's more like little endian vs little endian. It's marginally better if everyone settles for one indexing.

In a good high level language and programming style you rarely need to think in indexes. In a low level language 0-indexing is better.

Re:“Dijkstra is Wrong and So am I” – an argument against 0-b... by ComputerGuru on Tuesday September 18, 2018 @03:10PM (#18018208)
In low-level languages, an index is literally a pointer offset. p[n] is *(p+n), and 0 makes sense. In higher-level languages, it's a less direct dereference that may or may not be directly mapped in a similar fashion.

Since there's a real basis for 0-indexing and none for 1-indexing, obviously 0 is right.

Re:“Dijkstra is Wrong and So am I” – an argument against 0-b... by throwaway5250 on Tuesday September 18, 2018 @04:00PM (#18018606)
Those who do not understand Dijkstra are doomed to revinvent him.

There are plausible, though inferior, arguments for 1-based arrays. This person doesn't even manage to make them, though.

Re:“Dijkstra is Wrong and So am I” – an argument against 0-b... by kuwze on Tuesday September 18, 2018 @02:45PM (#18018000)
Re:“Dijkstra is Wrong and So am I” – an argument against 0-b... by Gibbon1 on Tuesday September 18, 2018 @03:25PM (#18018331)
This is the right answer, In addition I think a CS degree teaches you to how to write algorithms and work experience teaches you to not. And modern practice teaches you to avoid monkeying with array indexes when possible.