News for hackers. Stuff that matters.
Re:Giving up on Julia by dnautics on Friday May 13, 2016 @06:32PM (#11693625)
You shouldn't be so biased. Having one based indexing makes translating numerical recipes from pure math textbooks (where vectors and matrices are generally one-based) simpler and less error prone. I say this as someone who chafes at Julia's one based indexing as a matter of professional practice.
Re:Giving up on Julia by bluecalm on Friday May 13, 2016 @10:47PM (#11694353)
It's very error prone if you implemented algorithms using 0 based indexing your whole programming life. You are just bound to make mistakes if suddenly it's 1 based indexing.

I am not saying 0 based indexing is technically superior (I really have no opinion on that). I could compare it to switching positions of brake and accelerator in a car - you can talk about brake on the right design being superior all you want but the fatal crashes will happen if you implement it.

Re:Giving up on Julia by rrock on Friday May 13, 2016 @11:10PM (#11694397)
This is exactly why all of my off by one errors happen in zero-based indexing languages. I need 1-based languages for data analysis, and 0-based languages for working on instrumentation.
Re:Giving up on Julia by dragonwriter on Friday May 13, 2016 @10:56PM (#11694376)
Of course, zero-based indexing is prone to error if you've grown up using natural language ordinals your whole life, and get business requirements based in them both of which are stunningly common of real developers and real development tasks.
Re:Giving up on Julia by dnautics on Saturday May 14, 2016 @02:27AM (#11694771)
0-based indexing is technically superior, because it makes offsets for memory addressing simpler.
Re:Giving up on Julia by Avshalom on Saturday May 14, 2016 @05:22AM (#11695268)
Well unless your array is more than just x-many addresses in a row, like if the array carries metadata related to length (like every language but C) or if it's a sparse array (hint sparse arrays are super common in numerical work).