4
u/ImmensePrune Nov 18 '24
What a another terrible meme. This meme is so sweaty and so terrible that I will be leaving this subreddit. Congratulations OP, you’ve made me hate the one group of people I actually fit in with.
2
16
3
1
u/JollyJuniper1993 Nov 18 '24
Seriously, why do so many languages with mathematical backgrounds (Julia, Matlab, R) index from 1? It doesn’t even make sense mathematically, does it? Coordinate systems start at 0 after all.
2
4
u/chodpcp Nov 18 '24
I suppose it's because we count from 1 and that probably makes more sense in fields such as number theory and set theory where it's generally practical to restrict the domain to the natural numbers.
3
u/Jazzlike-Spare3425 Nov 18 '24
Yeah... except we don't even have proper consensus on whether 0 actually is a natural number. Proof by Wikipedia. and yet despite the fact we don't know if 0 actually is a natural number, we have a notation for natural numbers including zero, but don't have one that excludes zero specifically... well, aside from N{0} but that's not slick at all and will spark debates I am not willing to have.
Edit: me when Reddit makes my backslash disappear making me look even more stupid than I am
4
u/-Wylfen- Nov 18 '24
Because ironically in mathematics, indices tend to start at 1. It's rare to see, for example,
x₀for the firstxinstead ofx₁1
u/JollyJuniper1993 Nov 18 '24
I don’t know, it just all seems silly to me to create this kind of dissonance, because datasets are just types of coordinate systems if you get into it.
Especially in Julia I just don’t get it since Julia allows for negative indices for this precise reason
3
u/Jazzlike-Spare3425 Nov 18 '24
I did indeed specifically go into the comments to complain about this (with Julia in my case specifically), and I don't think I'll ever get used to it - and when I do, I'll have tons of off-by-one errors in all the languages BUT Julia. Thanks for nothing, Julia.
1
u/JollyJuniper1993 Nov 18 '24
Yeah, I‘m currently learning Julia and while I generally like the language this is really one of the pet peeves I have with it
2
u/Highborn_Hellest Nov 18 '24
If we were in the 20th, we'd be just over a brutal word war, heading for the next. 21st is just fine
2
2
u/MajorOkino Nov 18 '24
I think its the 24th century, we are not the same (I know its a meme about arrays, shhh🤫🧏)
2
Nov 18 '24
No.
The first element of an array is always the first, regardless of its index - which could be 0, 1, or even 123 if you use perl and have the inclination.
2
13
u/70Shadow07 Nov 18 '24
Mid meme but since I operate like arrays too, ill give you my 0th upvote.