-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]speculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative
Description
Should @view
or @views
be extensible to other things besides ref
(getindex
) expressions? For example, @views
could change every function call f(...)
into:
maybeview(f::F, args...; kws...) = f(args...; kws...)
which packages could overload to add view support for their functions on selected argument types.
For example, as I commented in another #37367, numpy.flip
returns a view, which is much faster than explicitly computing reverse
and is sufficient for many if not all usages of reverse
; it might be natural for @views
to change reverse
calls on array arguments into view constructors.
jlperla
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]speculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative