News for hackers. Stuff that matters.
Re:Correctness and composability bugs in the Julia ecosystem by poulpy123 on Monday May 16, 2022 @01:26PM (#31400643)
Why allow iterating with 1:length(A) if it's not the good way ?
Re:Correctness and composability bugs in the Julia ecosystem by cmcaine on Monday May 16, 2022 @01:32PM (#31400735)
I don't think there's any clean way to stop that at a language level (some languages prevent this by disallowing random access to arrays, but that's a non-starter for a performance-oriented language), and also it would be a massively breaking change.
Re:Correctness and composability bugs in the Julia ecosystem by adgjlsfhk1 on Monday May 16, 2022 @01:30PM (#31400713)
you can't disallow it at a language level since either way, you are just indexing with Ints. That said, we can add better linting rules to catch stuff like this.