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

VIP: enforce defaults to be ... in interfaces #4393

Open
charles-cooper opened this issue Dec 11, 2024 · 1 comment
Open

VIP: enforce defaults to be ... in interfaces #4393

charles-cooper opened this issue Dec 11, 2024 · 1 comment
Labels
VIP: Approved VIP Approved
Milestone

Comments

@charles-cooper
Copy link
Member

charles-cooper commented Dec 11, 2024

          > btw, it should be allowed to use `= ...` for defaults, so you don't have to specify a specific value (should the value be enforced if present?)

That's a good point. Maybe we should always enforce defaults to be ... in interfaces

Originally posted by @charles-cooper in #3170 (comment)

per @fubuloubu #3170 (comment)

@cyberthirst
Copy link
Collaborator

i'm in favor of enforcing this

  1. simplifies the implements statement (although this would loose some comp time guarantees of what the default value is - but we're not enforcing it now anyway)

  2. easier for users to understand. if a concrete value is provided it's fairly easy to assume that it's filled at callsite - while the semantics are "interface with a contract which implements a default value for this parameter"

@charles-cooper charles-cooper added the VIP: Approved VIP Approved label Dec 15, 2024
@charles-cooper charles-cooper added this to the v0.4.2 milestone Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VIP: Approved VIP Approved
Projects
None yet
Development

No branches or pull requests

2 participants