[swift-evolution] [Review] SE-0077: Improved operator declarations

Xiaodi Wu xiaodi.wu at gmail.com
Wed May 18 01:20:35 CDT 2016


>         * What is your evaluation of the proposal?
>

Generally in favor. To indulge in a little bikeshedding:

* `precedencegroup` defines both associativity and precedence, so the
naming isn't great. Maybe `operatorgroup`?
* I'm not sure about the parentheses used between the braces. To me, it
would fit better with the language to use colons.
* It may be confusing that relative precedence levels are themselves
described using operators or words that describe operators. I'd suggest
simpler words that aren't self-referential, such as "above" and "below".

So to put it all together, here's the color of my bikeshed:

```
operatorgroup Comparative {
  associativity: left,
  precedence: above(LogicalAnd)
}


>         * Is the problem being addressed significant enough to warrant a
> change to Swift?
>         * Does this proposal fit well with the feel and direction of Swift?
>         * If you have used other languages or libraries with a similar
> feature, how do you feel that this proposal compares to those?
>         * How much effort did you put into your review? A glance, a quick
> reading, or an in-depth study?
>
> More information about the Swift evolution process is available at
>
>         https://github.com/apple/swift-evolution/blob/master/process.md
>
> Thank you,
>
> -Chris Lattner
> Review Manager
>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160517/c6b18078/attachment.html>


More information about the swift-evolution mailing list