You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using implements in .vyi files shouldn't force to copy paste the methods from the imported interface. It should just defer the implementation of the methods to future implementations as a dependency.
Motivation
As of now people willing to combine interfaces together similar to solidity's inheritance, have to do so manually in a verbose manner. This approach makes it simple and concise to do so.
I don't oppose the overall proposal here, as I think it's a sane thing to do, but I want to share some additional thoughts/concerns:
The proposal breaks the semantics around implements. For me as a library author that offers custom interfaces without explicit implementations, having implements enforce the correctness of my custom interface is a feature.
It's problematic for a single keyword to have different meanings based on the compilation target. Furthermore, .vyi files will be made compilable probably in the feature: Vyper interface compilation #4232. So this could lead to the situation where you compile a .vyi file with an incomplete implements statement, which would give a wrong sense of correctness for the interface itself.
I don't oppose the overall proposal here, as I think it's a sane thing to do, but I want to share some additional thoughts/concerns:
The proposal breaks the semantics around implements. For me as a library author that offers custom interfaces without explicit implementations, having implements enforce the correctness of my custom interface is a feature.
It's problematic for a single keyword to have different meanings based on the compilation target. Furthermore, .vyi files will be made compilable probably in the feature: Vyper interface compilation #4232. So this could lead to the situation where you compile a .vyi file with an incomplete implements statement, which would give a wrong sense of correctness for the interface itself.
i think there should just be a different keyword, extends:.
Simple Summary
Using
implements
in .vyi files shouldn't force to copy paste the methods from the imported interface. It should just defer the implementation of the methods to future implementations as a dependency.Motivation
As of now people willing to combine interfaces together similar to solidity's inheritance, have to do so manually in a verbose manner. This approach makes it simple and concise to do so.
Specification
As described in the summary.
Backwards Compatibility
This is a breaking change for .vyi files.
Copyright
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered: