[swift-evolution] [Review] SE-0091: Improving operator requirements in protocols

Guillaume Lessard glessard at tffenterprises.com
Wed May 18 16:23:40 CDT 2016


> On 18 mai 2016, at 15:09, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
> Yeah, also good points. Can I propose maybe another approach?
> 
> ```
> T.operator(+, a, b)
> T.operator(prefix: ++, a)
> T.operator(postfix: ++, a)
> ```

I like that this applies the “postfix” or “prefix” labels to what they qualify: the operator.
The original proposal applies them to the parameter, which makes my head spin.

Cheers,
Guillaume Lessard



More information about the swift-evolution mailing list