News for hackers. Stuff that matters.
Re:Correctness and composability bugs in the Julia ecosystem by rocqua on Monday May 16, 2022 @11:38AM (#31399016)
My experience is that 0-based offsets (and use of < or even != for upper bounds) mean that I should almost never have to write something like idx - 1 or idx + 1.

I came to 0-based offsets later in my career, having started with Matlab. So I have some real experience with 1-based offsets. Experience that was 'untainted' by being used to a different option. I much prefer 0-based.

Especially because I now sort-off have a linter rule in my head 'if I am writing i - 1 then I am making a mistake or doing something the wrong way'. Which has been quite successful.

Re:Correctness and composability bugs in the Julia ecosystem by drBonkers on Tuesday May 17, 2022 @01:29AM (#31406367)
I have a similar experience. Matlab was my first experience with computational work. Now I use Python and 0-based is still more natural.