>arrays are 1-indexed
literally a garbage-fire language that belongs in the trash
>arrays are 1-indexed
literally a garbage-fire language that belongs in the trash
Other urls found in this thread:
cs.utexas.edu
godbolt.org
twitter.com
arrays being 1 indexed actually makes sense, 0 index is just a holdover from shit like C where arrays are just pointers in disguse
Hey, that's my name! :3
But they still are.
most languages dont decay arrays into pointers anymore, no
If you work with math 1-index is fantastic to translate formulas with summation directly into code
What do they do instead?
they remain an array
depends if the language/framework/library was developed with FP in mind
R/Julia yes (also they are both 1 indexed)
Python+Pandas """decays into a pointer""" since the dataframe is often edited in place