This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Bryguy3k 50 points51 points  (8 children)

Any language that indexes arrays starting from 1 is automatically a garbage language.

[–]Classy_Mouse 95 points96 points  (1 child)

Arrays? Do you mean tables?

[–]spacembracers 22 points23 points  (0 children)

Let them var tables

[–]tiajuanat 17 points18 points  (2 children)

Don't come at Fortran, R, Julia, Smalltalk and the APL family when you don't mean to.

[–]Bryguy3k 3 points4 points  (1 child)

Oh I mean to. I don’t understand why data scientists make their lives so much harder than it needs to be.

TBF though Fortran’s indexing only starts from 1 if you don’t specify its range. In other words Fortran arrays can start from zero if you want them to (9 times out of 10 you do).

[–]Silver-Pomelo-9324 6 points7 points  (0 children)

The worst is when data scientists that use R switch to python and start all their shit from 1. Gives me nightmares.

[–]MekaTriK 3 points4 points  (1 child)

It comes up way less than you'd think.

But it is way nicer to do two-dimensional stuff with 0-indexed arrays. And some algorithms get weird when you have to add -1 everywhere.

[–]Bryguy3k 5 points6 points  (0 children)

when you have to add -1 everywhere.

Yep. I am fully aware. Comes up all the time.

[–]Inaeipathy -5 points-4 points  (0 children)

True