-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
reimplement _setindex
using recursion
#54479
base: master
Are you sure you want to change the base?
Conversation
FTR, this PR is part of a series of changes which (re)implement many of the operations on tuples using a new recursive technique. The ultimate goal is to hopefully increase the value of the loop-vs-recurse cutoff (`Any32`, sometimes hardcoded `32`) for tuple operations. Updates JuliaLang#54462 Closes JuliaLang#54463 Example type inference improvement: ```julia-repl julia> Core.Compiler.return_type(Base.setindex, Tuple{Tuple{Vararg{Int}},Int,Int}) Tuple{Vararg{Int64}} ```
It is difficult to understand the relationship to the issue and prior PR. (typo?) from #54463 (comment)
I think there are two problems with the current (
If we don't use |
I think the true |
Regarding the naming of the functions, that's way off-topic IMO (to this PR).
Why? As shown above, the generic implementation seems to handle this just fine. |
Agreed. However, we would probably lose the opportunity to change it.
As noted above, it is because it is easy for humans to understand. TBH, I still don't understand this PR. If we were to try to support |
FTR, this PR is part of a series of changes which (re)implement many of the operations on tuples using a new recursive technique. The ultimate goal is to hopefully increase the value of the loop-vs-recurse cutoff (
Any32
, sometimes hardcoded32
) for tuple operations.Updates #54462
Closes #54463
Example type inference improvement: