[swift-evolution] [Returned for revision] SE-0077: Improved operator declarations

L. Mihalkovic laurent.mihalkovic at gmail.com
Tue Jun 28 11:12:05 CDT 2016


Question inline
Regards
LM
(From mobile)
On Jun 28, 2016, at 1:01 AM, John McCall via swift-evolution <swift-evolution at swift.org> wrote:

>> On Jun 25, 2016, at 10:57 AM, Anton Zhilin via swift-evolution <swift-evolution at swift.org> wrote:
>> I replaced `precedencegroup` with `precedence` and added `Precedence` 
>> suffix to all precedence group names. See:
>> 
>> https://github.com/Anton3/swift-evolution/blob/fix-operator-
>> precedence/proposals/0077-operator-precedence.md
>> 
>> My feelings:
>> 1. `precedencegroup` describes what it declares more precisely
>> 2. `precedence` is shorter (partially compensating for longer names)
>> 3. `precedence` can be correctly interpreted as "precedence level"
>> 4. `precedence` looks nicer overall
> 
> Keep in mind that this is a pretty marginal feature.  I'm not sure "precedence" is a reasonable enough thing to take as a keyword for it.
> 
> John.

Would a meta-circular definition be possible (proposed a version using enums)? I remember a mail from chris about moving certain things currently backed into the compiler towards the stdlib, is this one a possible candidate... 

> 
>> 
>> 5. `Precedence` suffix is bulky. One must specify it in operator 
>> declarations and in all relationships
>> 6. All groups ending with adjectives may unambiguously drop the suffix
>> 7. Number of such groups is small. New groups will tend to be named after 
>> corresponding operators, and they will be noun-based
>> 
>> Questions:
>> 1. Where else can we drop -Precedence?
>> 2. Can we make more names end with adjectives?
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution


More information about the swift-evolution mailing list