5 ms·
You can turn any 1 based array into a 0 based array using a wrapper type that just gets inlined away. Also have a look at https://github.com/giordano/StarWarsA
by freemint 5y ago
You can turn any 1 based array into a 0 based array using a wrapper type that just gets inlined away.
Also have a look at https://github.com/giordano/StarWarsArrays.jl https://github.com/giordano/StarWarsArrays.jl
- cookieater 5y agoMose Giordano hit the nail on the head with this one. Who cares about 1 vs 0 based indices? If anything its a silly and minor design decision. I worry about someones ability to solve real problems in any language if they can't get their head around an +1/-1 when indexing into an array.
- hpcjoe 5y ago> I worry about someones ability to solve real problems in any language if they can't get their head around an +1/-1 when indexing into an array. This. Think about what this signals to employers and interviewers if someone throws a hissyfit over this.