-
-
Notifications
You must be signed in to change notification settings - Fork 788
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
VIP: Remove required keyword arguments from builtin functions #1879
Comments
I might have missed some builtins, will update this VIP if I encounter any others. |
This would be what I prefer |
I like this but it should be a different VIP |
nice to have: just use python slice syntax (but should also be new VIP) |
Update this VIP to talk just about |
Simple Summary
Vyper should not use required keyword arguments in built-in functions.
raw_call
requiresoutsize
andgas
as keyword args.slice
requiresstart
andlen
as keyword args.Motivation
Given the similarity to between Vyper syntax and Python syntax, the current style is unintuitive to write and misleading to read. I believe keyword arguments should only be used for optional fields. All required arguments should always be positional.
Specification
raw_call
, convertoutsize
andgas
to positional arguments.a. Alternatively,
gas
could become an optional argument that defaults togasLeft
.slice
, convertstart
andlen
to positional arguments.Backwards Compatibility
This is a breaking change, but it will only require slight modifications to existing contracts.
Copyright
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered: