Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nequo
on May 14, 2023
|
parent
|
context
|
favorite
| on:
Julia 1.9.0 lives up to its promise
> 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.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
And in Julia, it’s
which also works with non-unit step sizes like 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.