Skip to content
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

RFC: generate get/setindex() #816

Closed
wants to merge 6 commits into from

Conversation

alyst
Copy link
Contributor

@alyst alyst commented Jun 16, 2015

The PR replaces "hand-written" getindex()/setindex!() methods with the generator for all possible combination of input parameters, including ::Colon.
With the recent introduction of explicit ::Colon in Julia v0.4, the number of methods getindex()/setindex!() methods would grow considerably, so the patch spares from the necessity of all these redundant declarations.
The generator is 100 lines less that the current hand-written code, maybe just a little bit more complicateв. It passes the tests on 0.3 and it would also pass the tests on 0.4 if the DataArrays.jl would be patched with JuliaStats/DataArrays.jl#152

kleinschmidt and others added 3 commits June 16, 2015 19:16
- generate getindex()/setindex!() for all possible combination
  of input parameters, including ::Colon
- throw KeyError/DomainMismatch instead of generic exceptions
@alyst
Copy link
Contributor Author

alyst commented Jun 16, 2015

@kleinschmidt sorry for the noise, for some reason git has put you in during the rebase

@quinnj
Copy link
Member

quinnj commented Sep 7, 2017

Are there missing getindex/setindex! methods currently? I'm not aware of any complaints or open issues about it, so I'm not sure this is worht the churn.

@nalimilan nalimilan closed this Sep 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants