Re:Julia 1.9.0 lives up to its promise
by huijzer on Saturday May 13, 2023 @04:36PM
(#35932443)
Okay. I’ll bite. Why?
[ Parent
| on HN ]
I 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.
Re:Julia 1.9.0 lives up to its promise
by sweezyjeezy on Saturday May 13, 2023 @05:02PM
(#35932677)
Same, but I think 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 think they would have got less flak matching the more popular 0-index languages.
Re:Julia 1.9.0 lives up to its promise
by sundarurfriend on Saturday May 13, 2023 @05:14PM
(#35932801)
> 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.
This is the opinion of Dykstra: https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF
Re:Julia 1.9.0 lives up to its promise
by Iwan-Zotow on Saturday May 13, 2023 @06:10PM
(#35933278)
sure, [0...N) ranges are composable, to be short
Re:Julia 1.9.0 lives up to its promise
by sundarurfriend on Sunday May 14, 2023 @08:37AM
(#35937514)
That 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.
Re:Julia 1.9.0 lives up to its promise
by Iwan-Zotow on Wednesday May 17, 2023 @10:04AM
(#35975364)
Splitting 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
You 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.