[swift-dev] [swift-evolution] There should be no reserved words (keywords) ?
jgroff at apple.com
Fri Mar 4 12:12:47 CST 2016
> On Mar 4, 2016, at 4:43 AM, Ted F.A. van Gaalen via swift-evolution <swift-evolution at swift.org> wrote:
> reserved words:
> In short:
> -= there should be none =-
> A compiler should have enough intelligence
> to determine from the statement’s context
> if words are used as a keywords or not.
> Like e.g. in PL/1 as I posted here before.
> What’s your opinion?
> Kind Regards, Ted.
We're getting close. We already allow arbitrary keywords as argument labels, and Doug has proposed allowing them after `.` accesses as well, so you can freely define and use methods named foo.default(in:if:else:). Keywords at that point only interfere with the "root" identifier of a chain, and you could introduce module, type, or instance qualification to avoid that problem (saying Module.default instead of `default`).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-dev