Actually, I'd like to correct what I said before: I don't think (:)[i] is
broken. It just passes back i, and that works for anything. It's up to us
whether 1 is equivalent to `first` or not.
On Sunday, June 19, 2016 12:19:53 AM CDT Sheehan Olver wrote:
> It would make more sense if
>
> * A=rand(10,10)*
> * S=sub(A,1:2,:)*
> * parentindexes(S)[2]*
>
> returned 1:10 instead of :, since : is not really specifying the
> "parentindexes".
It *is* specifying the parentindexes, in the most direct way possible. There
are a few subtle differences in behavior for : vs 1:10, including LinearFast/
LinearSlow indexing behavior and (now) indices preservation. Of course one
could translate it, but I fear it would be misleading because of those
differences.
What do you use parentindices for, anyway? In julia-0.5 it's still there but
I've sometimes wondered if it should be deprecated. I used to use it all the
time, but don't seem to anymore.
Best,
--Tim