News for hackers. Stuff that matters.
Re:Julia Language Co-Creators Win James H. Wilkinson Prize f... by synthmeat on Wednesday January 23, 2019 @09:51AM (#18978545)
Can't reply anymore to flagged-to-death sibling, but wrt "1-based array indexing":

I've actually found behaviour of "zero-avoidance" a good battle-tested heuristics to coding. A lot of numeric spaces can be mapped as to be >0 or >0<. Obviously (?) not all of them can, but it's helpful in reducing cyclomatic complexity in logic code, as well as to consumers so they can uniformly handle all falsey values.

Arithmetic is much safer without 0.

Re:Julia Language Co-Creators Win James H. Wilkinson Prize f... by vectorEQ on Wednesday January 23, 2019 @11:54AM (#18979942)
offset 1 is logical if you look at the machine code / data in memory.

if you have array [a,b,c,d] array[0] is a which in computer is logical. why? because it stored in memory 'abcd' (forgetting endianness for sake of argument...) and the offset from the base pointer to a is 0. so it makes perfect sense for arrays to start at 0, as there is no offset from the base... there is not 1 item offset from the base :s if you find it confusing i would say learn how computers actually operate instead of arguing from some theoretical frame of mind which has nothing to do with how computers work. a computer isn't mathematics or some arithmetic machine.

just because arithmetic is safer without 0 doesn't mean it's logical for a computer to suddenly have different array indexing. array indexing on a computer has nothing to do with maths. just memory layout and pointers...

#addsfueltofire

Re:Julia Language Co-Creators Win James H. Wilkinson Prize f... by Tarq0n on Wednesday January 23, 2019 @12:12PM (#18980144)
Ok, but why should that influence a managed language with no pointers?
Re:Julia Language Co-Creators Win James H. Wilkinson Prize f... by giornogiovanna on Wednesday January 23, 2019 @12:30PM (#18980341)
It shouldn't. One-based indexing is what all the research uses, so it is undeniably the better choice for Julia. But zero-based indexing isn't just a memory trick, it makes lots of math easier when you're concatenating ranges or slicing arrays or doing modular arithmetic anywhere near an array.
Re:Julia Language Co-Creators Win James H. Wilkinson Prize f... by goto11 on Wednesday January 23, 2019 @12:34PM (#18980387)
GOTO is logical when you look at machine code - that does not mean it is the best possible abstraction. There is a reason we use higher level languages.
Re:Julia Language Co-Creators Win James H. Wilkinson Prize f... by mathdog on Wednesday January 23, 2019 @10:56AM (#18979279)
cyclomatic complexity in logic