Matrix multiplication - inconsistent behaviour

No, it’d be more akin to the @views macro and would walk through your expression tree to replace all getindex calls with a getindex_preserving_dimensions function — just like how @views swaps in view for getindex.

There’s been a slow but steady effort to make Julia’s syntax more locally overridable — for example in 1.5 you’ll be able to lexically change what gets called upon A' by locally shadowing var"'":

julia> module Test
       const var"'" = x->x^2
       a = 2
       @show a'
       end
a' = 4
Main.Test

This isn’t (yet) done in the same manner for square brackets. One tricky consideration is the fact that square brackets are used for both indexing and array literals.

Thanks for the pointer to your previous thread — I can no longer keep up with all the discussions here!

1 Like