<div dir="ltr"><div>Currently, "infix" is not required/allowed on an operator function definition, but "prefix" and "postfix" are:</div><div><br></div><div><div><div> prefix operator ^^ {} // valid</div><div> postfix operator ^^ {} // valid</div><div> infix operator ^^ {} // valid</div><div><br></div><div> prefix func ^^(operand: Int) {} // valid</div><div> postfix func ^^(operand: Int) {} // valid</div><div> infix func ^^(lhs: Int, rhs: Int) {} // <b>error: </b>'infix' modifier is not required or allowed on func declarations</div><div> func ^^(lhs: Int, rhs: Int) {} // valid</div></div></div><div><br></div><div>It seems like this was removed because it can be inferred from the number of arguments (<a href="https://github.com/apple/swift/commit/3ad9c58c18f0331444114e2eae3e772e702c326f">https://github.com/apple/swift/commit/3ad9c58c18f0331444114e2eae3e772e702c326f</a>). But IMO the inconsistency from other operator function decls/defs is jarring.</div><div><br></div><div>How does everyone feel about reinstating the "infix" modifier on functoins? (It was removed before the open-source release and the advent of swift-evolution, so I thought it'd be worth a public review.)</div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Jacob<br></div></div></div></div>
</div>