Maybe someone can develop an InboundsArray
type whose setindex
and getindex
methods are defined with @inbound
operations of the actual array wrapped, as a drop-in replacement of the Base Array. Then using InboundsArray
is guaranteed to only affect user code not Julia internals. This could be more ergonomic than using @inbounds
macro and chasing its propagation. (Except, of course, you’ll need to understand the danger.)
3 Likes