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: Change contract keyword to interface #1825

Closed
fubuloubu opened this issue Jan 8, 2020 · 3 comments · Fixed by #2038
Closed

VIP: Change contract keyword to interface #1825

fubuloubu opened this issue Jan 8, 2020 · 3 comments · Fixed by #2038
Labels
VIP: Approved VIP Approved

Comments

@fubuloubu
Copy link
Member

fubuloubu commented Jan 8, 2020

Simple Summary

Use interface as the keyword for defining an interface.

Motivation

VIP #885 added Interfaces to Vyper, but it chose the contract keyword, which in retrospect seems inconsistent with it's intended purpose.

Specification

Just change the keyword. Consider deprecating it first. It would look like:

interface MyInterface:
    def do_stuff(): modifying

Backwards Compatibility

This VIP would not be backwards compatible and would require a small change from users.

Dependencies

Depends on #885, which is already implemented

Copyright

Copyright and related rights waived via CC0

@fubuloubu fubuloubu added the VIP: Discussion Used to denote VIPs and more complex issues that are waiting discussion in a meeting label Jan 8, 2020
@fubuloubu fubuloubu changed the title Change contract keyword to interface VIP: Change contract keyword to interface Jan 8, 2020
@iamdefinitelyahuman
Copy link
Contributor

I'm in favor of this. Coming from Solidity, having an interface marked as a contract at the top, and then the actual contract having no designation - this always felt confusing to me.

@fubuloubu fubuloubu added VIP: Approved VIP Approved and removed VIP: Discussion Used to denote VIPs and more complex issues that are waiting discussion in a meeting labels Jan 20, 2020
@fubuloubu
Copy link
Member Author

Meeting note: Make a sensible error message if contract is used

@fubuloubu fubuloubu self-assigned this Jan 20, 2020
@fubuloubu
Copy link
Member Author

@iamdefinitelyahuman Shall we target for 0.2.0?

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

Successfully merging a pull request may close this issue.

2 participants