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

Proposal: remove numberOfArgs assertion on FunctionModel #108

Closed
sylvainpolletvillard opened this issue Mar 16, 2019 · 0 comments
Closed
Labels

Comments

@sylvainpolletvillard
Copy link
Owner

In v3, all FunctionModels come with a built-in assertion that checks if a function is not called with more parameters that it can handle. I propose to remove this assertion in v4, and make it opt-in on specific function models instead.

Arguments:

  • this is a quite important perf penalty that applies to all function models, and is difficult / non-intuitive to opt-out
  • the service provided by this assertion is not very valuable, since this can be statically analysed, and is actually already reported by common editors and linters
  • the assertion sometimes report false positives when the function refer to the arguments variable for example
  • this is the only built-in assertion for the whole library, so dropping this edge case helps making the library smaller and more consistent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant