News for hackers. Stuff that matters.
Re:Again on 0-based vs. 1-based indexing by dodobirdlord on Wednesday January 20, 2021 @11:27AM (#25848313)
Julia and Fortran, languages designed to be used for mathematics and high performance scientific computing, take a similar approach in the language itself and support arbitrary starting indices for arrays. Sometimes the math is just cleaner when the index starts at 0, or 1, or 2, or -1!

https://docs.julialang.org/en/v1/devdocs/offset-arrays/

Re:Again on 0-based vs. 1-based indexing by Acur on Wednesday January 20, 2021 @11:54AM (#25848711)
Julia (normally 1-based), Polynomials package:

    julia> using Polynomials
    julia> p = Polynomial([1, 0, 2])
    Polynomial(1 + 2*x^2)

    julia> p[0]
    1
As long as it is domain specific and wrapped in custom types I don't really see an issue.
Re:Again on 0-based vs. 1-based indexing by petschge on Wednesday January 20, 2021 @11:43AM (#25848563)
And of course there is C++ libraries to do the same. For example the blitz++ library. Negative indices to the left of element[0] are great for ghost zones in codes that do domain decomposition over different MPI ranks.