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
Replace recursive calls in typed-functions with this
-style calls
#1903
Replace recursive calls in typed-functions with this
-style calls
#1903
Conversation
😂 not needed to be that modest, you're doing a great job Nick! Thanks a lot! I've run the benchmarks in mathjs too, and the performance stays the same 👍 . I think this PR currently fixes 99% of the cases, impressive. I noticed the following edge cases:
If you want I can take a look at these edge cases too. |
3fcc9ca
to
1469e88
Compare
I replaced the remaining assignments of typed-functions. I'm not sure if you had anything in particular in mind for the refactor of |
Thanks Nick! About the And for functions like |
I actually already refactored The complication with From
From
I see the note about moving |
Hm, you're right, there are properties attached in I now see you've indeed already refactored So, I think this PR is ready to merge, right? |
Yeah, I think we're probably good to go. |
🎉 will merge now and publish a new version tonight. Thanks again Nick for all your effort! |
As described in the issue here: #1885, if a typed function invokes itself from within a local context, as is done in many of math functions in the library, it will not have access to signatures merged in later on. The
typed-function
library now supports self invocation usingthis
to address this issue.This PR attempts to replace all the instances of recursion with the new
this
-style call.