This is possible in ruby too, probably in a lot of languages.
I've rewritten someobject#[] plenty of times to have cleaner code.
I've rewritten someobject#[] plenty of times to have cleaner code.
Julia can inline through all the `getindex!` functions so you get the same performance as with a hand-coded C or Fortran array.