carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Syntax for implementing a single-function interfaces

Open josh11b opened this issue 11 months ago • 7 comments
trafficstars

Summary of issue:

Many of the operator overload interfaces have a single function, and other interfaces are expected to commonly as well. The current impl definition syntax is perhaps cumbersome for this case. Perhaps we should have a convenient shortcut?

In order to allow evolution of interfaces, this should apply any time the interface has one required function. If this convenient syntax is used, it should ignore functions with a default or final definition in the interface.

josh11b avatar Dec 18 '24 21:12 josh11b