<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I wouldn’t go as far as to <b class="">require</b> it, but having it for optional use “for symmetry" seems fine to me.</div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 11, 2016, at 21:03, Jacob Bandes-Storch via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Currently, "infix" is not required/allowed on an operator function definition, but "prefix" and "postfix" are:</div><div class=""><br class=""></div><div class=""><div class=""><div class=""> prefix operator ^^ {} // valid</div><div class=""> postfix operator ^^ {} // valid</div><div class=""> infix operator ^^ {} // valid</div><div class=""><br class=""></div><div class=""> prefix func ^^(operand: Int) {} // valid</div><div class=""> postfix func ^^(operand: Int) {} // valid</div><div class=""> infix func ^^(lhs: Int, rhs: Int) {} // <b class="">error: </b>'infix' modifier is not required or allowed on func declarations</div><div class=""> func ^^(lhs: Int, rhs: Int) {} // valid</div></div></div><div class=""><br class=""></div><div class="">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" class="">https://github.com/apple/swift/commit/3ad9c58c18f0331444114e2eae3e772e702c326f</a>). But IMO the inconsistency from other operator function decls/defs is jarring.</div><div class=""><br class=""></div><div class="">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" class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">Jacob<br class=""></div></div></div></div>
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>