Re:Julia Language Co-Creators Win James H. Wilkinson Prize f...
by bobochan on Wednesday January 23, 2019 @11:54AM
(#18979938)
VBA actually lets you decide at the top of each module whether to use 0 or 1 based indexing. The default value is 0, but you can specify "Option Base 1" to change that.
There is an interesting note in the Wikipedia page for "Dartmouth BASIC" which says the second edition "also allowed arrays to begin as subscript 0 instead of 1. This was especially useful for representing polynomials."
Re:Julia Language Co-Creators Win James H. Wilkinson Prize f...
by baldfat on Wednesday January 23, 2019 @11:09AM
(#18979446)
The issue is 1 will mean different things. That should be a bigger issue than anything else. When you are doing math
1 + 1 = 2 always means two. When you are getting the 1 column we are getting the second column. This while makes sense when doing certain lower level programming this makes no sense with functional or higher level programming.
Also it's usually a bad sign if you need to worry too much about what index you used, you might be better of using index sets with whatever structure you need (and only the structure you need). In program languages that support it generous application of ranges and generators tends to get rid of most complications.