Do you need the bracket notarion 'x[-5]'? This would be best implemented as a package with explicit get/set, as Matt implied... As otherwise you risk some tricky bugs. Also if you're implementing "array-like" types, I would definitely use 0.4+.
On Sunday, September 27, 2015, Matt Bauman <[email protected]> wrote: > There has been a lot of discussion about this in the past few weeks > > https://groups.google.com/d/msg/julia-users/ScwXMfQIBGs/wD1HTXeZBQAJ > https://groups.google.com/d/msg/julia-users/fNisYpMdZ6o/DvFaQi_ZBAAJ > > TL;DR, yes, it is possible, but it takes some care since it's violating a > fairly well-entrenched assumption about how arrays behave. > > On Sunday, September 27, 2015 at 10:48:22 AM UTC-4, Mark Sherlock wrote: >> >> Hi, >> >> I work in computational physics. The main reason we all use Fortran in my >> area is because it allows arrays to have negative indices. This is very >> useful when solving some partial differential equations (in e.g. plasma >> physics, astrophysics, fluid mechanics). >> >> I and my colleagues frequently consider alternative languages but in the >> end never change due to the headaches involved regarding this. Since Julia >> seems to be focused on computational science, >> I am wondering how likely it is that this would ever be implemented, >> and/or how we could encourage the developers to do this? >> >> In all other areas Julia looks fantastic for our needs! >> >
