[swift-evolution] [Proposal] Refining Identifier and Operator Symbology

Colin Barrett colin at springsandstruts.com
Sat Oct 22 20:49:39 CDT 2016

> On Oct 22, 2016, at 8:53 PM, Jonathan S. Shapiro <jonathan.s.shapiro at gmail.com> wrote:
> I missed this earlier posting from Joe Groff, who wrote:
> In the discussion about operators, I wonder whether it makes sense to formally separate "identifier" and "operator" characters at all. ...
> The consequence if we do not formally separate the operators (verbs) from the identifiers (nouns) is that white space will be needed around all operators. That's not necessarily a bad thing, but it would be a significant and incompatible departure from today's Swift, both in terms of actual source code breakage and in terms of the "look and feel" that many people feel passionate about.

That’s one way yeah. Or you’d could to make the grammar context sensitive / apply a "lexer hack”. Probably other ways to deal w/ context sensitivity as well. Joe’s proposed syntax seems pretty explicit, and hopefully it’sdsimple to plumb / capture that info in the lexer. (I’m ignorant of the implementation of Swift’s front-end unfortunately!)


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

More information about the swift-evolution mailing list