-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
indexing with Begin and End as types #38296
Comments
Yes, |
the word lazy was very exshaustingakgaga |
Agreed with the limitation @yuyichao pointed out, but you can implement some support. What you're proposing already exists in EndpointRanges.jl. |
@yuyichao ok, I see how doing it with the parser has some benefits. @timholy thanks for the link. I'll point users that want this functionality to that package for now. How you define a few base methods for Still |
See also #35681 for |
Personally, I find the lazy I think this can safely be closed as a dup of #35681. |
This syntax always concerned me - it's too magic.
The magic also causes issues with packages like DimensionalData.jl and presumably others similar to it, where you don't have to index in the right order or include all the axes, or where you use different brackets for special indexing. Ranges with
begin
andend
in them also can't be passed around though other methods.This alternative uses the singletons
Begin
andEnd
and aLazyRange
object, which becomes a real range into_indices
:Ae there any foreseeable problems with this approach?
The text was updated successfully, but these errors were encountered: