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

Jordan Rose jordan_rose at apple.com
Mon May 23 22:14:01 CDT 2016


> On May 23, 2016, at 13:10, Антон Жилин via swift-evolution <swift-evolution at swift.org> wrote:
> 
> @CoreTeam Please, don't forget to merge pull request with fixes and alternatives from review period.
> 
> @AnyoneElse Today is (formally) the last day of review. It may be your last chance!
> 
> Apple repo link:
> https://github.com/apple/swift-evolution/blob/master/proposals/0077-operator-precedence.md <https://github.com/apple/swift-evolution/blob/master/proposals/0077-operator-precedence.md>
> 
> My repo with some latest changes:
> https://github.com/Anton3/swift-evolution/blob/master/proposals/0077-operator-precedence.md <https://github.com/Anton3/swift-evolution/blob/master/proposals/0077-operator-precedence.md>

Thanks for doing this. While I’m a little apprehensive about the implementation, I don’t expect it to be a problem in practice; a DAG is a pretty safe data structure, and the size of the graph (i.e. the number of precedence groups in a program) probably won’t be that big in practice. And it’s so much better than arbitrary precedence numbers.

To discuss later: what are the naming guidelines for precedence groups? (What part of speech? Why UpperCamelCase?) Are they in a separate scope from normal names? Can you qualify them with module names?

(Operator declarations in general are weirdly global right now, because they need to be resolvable without doing full lookup work, and because it was easier to implement them that way. So making precedence groups special as well is probably fine, at least for now.)

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160523/5d1353b6/attachment.html>


More information about the swift-evolution mailing list