4 ms·
Okay. I’ll bite. Why?
by huijzer 3y ago
Okay. I’ll bite. Why?
- xedrac 3y agoI used Julia for a project back in 2016, and had the same adverse reaction to 1-based indexing. It's the same reason I have a hard time with Lua. Why? I suppose it's all rather superficial, but it's one of those things that just grates on me and I'll avoid it if I can. I'm not sure there's a logical explanation, but I've found the sentiment to be rather common among developers.
- sweezyjeezy 3y agoSame, but probably it's more of a familiarity bias rather than a logical one. I think there is a strong argument to index from 1 as is done in MATLAB, R etc. since it matches the way most people refer and think about lists in reality. A brave decision from the authors though, I imagine they would have got less flak matching the more popular 0-index languages.
- sundarurfriend 3y ago> I think they would have got less flak matching the more popular 0-index languages. Possibly, though those of us already in the space would have found it a (slightly) less pleasant language then.
- gcmrtc 3y agoThis is the opinion of Dykstra: https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF
- Iwan-Zotow 3y agosure, [0...N) ranges are composable, to be short
- sundarurfriend 3y agoThat is such a weird argument to me. I can count in the fingers of one hand the number of times in my life that I've had to compose ranges, it seems a strange thing to optimize for.
- Iwan-Zotow 3y agoSplitting and combining back ranges is very common activity since about Core 2 Duo, when multi-core getting to be a normal. I mean, computing mean - split range, get result per split and combine it back, and so on and so forth
- npalli 3y agoYou seem to have a weird fetish for composable ranges seeing your history of comments on exactly this topic (even this thread!). The number of times I have had to think about composability as you mention is close to zero. In fact, the off-by-one errors with C class of languages due to the open ended nature of the interval have bit me about 3-4 orders of magnitude more. There is an entire class of security bugs because of this. I find this obsession very strange, YMMV obviously.