News for hackers. Stuff that matters.
Re:Julia 1.9.0 lives up to its promise by nequo on Sunday May 14, 2023 @12:48AM (#35935393)
> number of elements to process is exactly the difference between last and first index of the range

And in Julia, it’s

  length(a:b)
which also works with non-unit step sizes like

  length(a:x:b)
The intent of these expressions seems clearer than the intent of `b-a` and `ceiling((b-a)/x)` with your proposed approach in a zero-indexed language.

There are no comments on this comment yet.