5 ms·
In Julia, you don't have to calculate linear indices yourself since you can create a reshaped view of a blob of memory in arbitrary number of dimensions. So thi
by newen 8y ago
In Julia, you don't have to calculate linear indices yourself since you can create a reshaped view of a blob of memory in arbitrary number of dimensions. So this case doesn't come up. Also there are plenty of cases where 0-indexing is more awkward than 1-indexing. Actually reading your Dijkstra link will make that pretty clear. Reading it will also make it clear that the 0-indexing choice is pretty arbitrary and that you can make a very similar case for 1-indexing too. This 0-indexing meme really needs to die, especially the argument from authority by linking to Dijkstra.
- 0-_-0 8y agoContrary to your summary, the quote makes a good case for 0-based indexing, both theoretical and practical. How can an argument based on reason become an argument from authority just because someone well known said it?
- mkborregaard 8y agoThat is in fact how an argument becomes an argument from authority. Also, it has become an HN meme to post the Dijkstra comment every single time there's a post mentioning Julia. It's not like it's news to anyone.
- StefanKarpinski 8y agoAlso Dijkstra's arguments are pretty weak and unconvincing. If anyone else had made the same arguments, no one would ever refer to it.