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

Антон Жилин antonyzhilin at gmail.com
Tue May 24 05:16:35 CDT 2016

> While I’m a little apprehensive about the implementation

It was simple in the beginning, then two additions were made:
1. Global transitivity checking
2. Precedence relationships that, by transitivity rule, create relationship
between two imported groups, is an error (John McCall)

I don't know how to do any of these checks without nxn connectivity table.
Is that even possible?

> Are they in a separate scope from normal names?
Yes, otherwise Range would be a conflict with standard library structure.

> Can you qualify them with module names?
Right now, I guess, no, although that would be nice to have. I agree that
this can be discussed later.

- Anton

2016-05-24 6:14 GMT+03:00 Jordan Rose <jordan_rose at apple.com>:

> 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
> My repo with some latest changes:
> 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/20160524/917d30ba/attachment.html>

More information about the swift-evolution mailing list