4 ms·
Yet another battle won in the 0 indexing vs. 1 indexing war
by simonjgreen 3y ago
Yet another battle won in the 0 indexing vs. 1 indexing war
- kazinator 3y agoIt just shows you how reality-denying the 1 indexers can be, going as far as calling a newborn 1 even though (if normal term) it was conceived roughly 0.75 years ago.
- user982 3y agoDon't consider it an age then, think of it as "the count of calendar years within which a person has existed." A newborn has only seen 1 year, 2023. An infant born any time in 2022 has lived across 2 years. This simplifies things when you only need, or only have, someone's year of birth.
- kazinator 3y agoWhy restrict to years? I have existed in two calendar millennia.
- creatonez 3y agoThere is no indexing standard that is more fundamental than another. For example zero-indexing is particularly unnatural when working with mathematical series (https://math.stackexchange.com/a/1203057 https://math.stackexchange.com/a/1203057 ). It made a ton of sense for computing because every arbitrary sequence of bits represents a valid index, but it falls short in some other domains.
- kelipso 3y agoThe more reality denying part is when you ignore that age is calculated on distance and not counting.
- petesergeant 3y agoeven weirder than that, as far as I can tell, as the whole year cohort ages together on the same day: https://en.wikipedia.org/wiki/East_Asian_age_reckoning https://en.wikipedia.org/wiki/East_Asian_age_reckoning
- rhplus 3y agoIt's not that weird - I'm sure most folks spend their school-years referring to other kids as "the same year (grade) as me" or "the year (grade) above/below me". Even to this day, I intuitively group friends based on the academic year group they were in.
- petesergeant 3y ago> Even to this day, I intuitively group friends based on the academic year group they were in How far out of school are you?
- Symbiote 3y agoI left university over 10 years ago, but I'm still aware of those friends who were in my year, vs others who were a year or two ahead or behind. People from my year are the ones I lived with, did group projects with, worked until midnight trying to solve a difficult task that had been set, celebrated the last exam with, etc. I certainly don't know the year for everyone. Students I mostly saw at parties, who studied different subjects (or went to different universities, for it was London) could easily be my year ±3 or more.
- petesergeant 3y agoI feel like the op was mentally translating people they’d never shared an academic context with into how many academic years above or below them they were — I’d noticed myself doing this for a couple of years after I left education
- fosk 3y agoLua is the “last standing man” now.
- adregan 3y agoHold your horses, APL[1] is not dead yet. However, at some point in its history, APL did gain the ability to assign the Index Origin[2] to 0 if the problem called for it via: ⎕IO←0 0: intentionally started the indexes from 1 ;) 1: https://en.m.wikipedia.org/wiki/APL_(programming_language) https://en.m.wikipedia.org/wiki/APL_(programming_language) 2: https://aplwiki.com/wiki/Index_origin https://aplwiki.com/wiki/Index_origin
- pif 3y agoAnd FORTRAN
- goosedragons 3y agoR still uses 1 indexing, Julia as well.
- nine_k 3y agoEvery language for scientific computation uses 1-based indexes, to follow the tradition of using them in formulas. FORTRAN, APL, Julia, R, MATLAB, GNU Octane, etc. I remember that (some versions of) BASIC back in the day had an option to switch between 1-based and 0-based indexing, to appeal to both Fortran and C folks.
- Y_Y 3y agoIn physics, relativists usually count from 0. Furthermore on the numerical side, C is at least as popular as Fortran. Julia lets you switch the index base too. Finally a special mention for Mathematica, which appears to be 1-based, but in fact is a thinly disguised 0-based lisp, {a,b} is just List[a,b] is really just (List a b) so of course if you want b you ask for element 2, element 0 is the head and is just List.
- frozenport 3y agoNumpy
- xeonmc 3y agoI prefer calling it "floor-index" vs "ceil-index" rather than 0/1 or offset/count based
- rcme 3y agoBoth 0 and 1 indexing aim to answer the question: "what is the index of the 1st element?" floor(1) = 1 and ceil(1) = 1 so I'm not sure how your names apply.
- edgineer 3y agofloor and ceil ideas apply to age and calendar years nicely because the underlying value, time, is on the real number line.