News for hackers. Stuff that matters.
Re:Correctness and composability bugs in the Julia ecosystem by markkitti on Monday May 16, 2022 @10:04AM (#31397389)
Yes, and it is a perfectly fine feature when applied correctly. It would be incorrect to assume that an `AbstractArray` starts at `1` or `0` which is why the updated example now correctly uses `eachindex`: https://docs.julialang.org/en/v1/devdocs/boundscheck/#Elidin...

If you want to assume that an array starts at `1` one needs to require an `Array` rather than an `AbstractArray`.

There are no comments on this comment yet.