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

Anton Zhilin antonyzhilin at gmail.com
Fri Jul 1 11:20:22 CDT 2016

John McCall via swift-evolution <swift-evolution at ...> writes:

> > There is a high chance that 'higherThan'/'lowerThan' names will be 
> > chosen. I still see a problem with that. Keywords in Swift are 
> > in full lowercase, so we should actually take 
> > 
> > But then what's the point of the preposition? It blends with 
> > higher/lower and doesn't actually add any clarity. So we should drop 
> > 'than' and have just higher/lower or above/below or 
succeeds/preceeds or 
> > whatever we choose, but *in a single word*.
> The preposition does add clarity.  Are the listed precedences the ones 
that are
> higher than the current precedence, or are they the ones that the 
> precedence is higher than?
> John.

I meant that following keywords should be preferred to be written in all 
lowercase. But in our case, we lose clarity from doing so.

An elegant solution seems to be to find expressive single-word keywords 
for our purpose, their advantage is that they can strictly follow 
keyword naming rules without losing clarity.

It seems that mine and some other people' concerns are based on this 
naming inconsistency of  higherThan  and  lowerThan. There are plenty of 
other good options: above/below, before/after, precedes/succeeds.

I know your opinion, but anyways want this argument to be risen during 
internal discussion.

More information about the swift-evolution mailing list