> On Jun 17, 2016, at 3:07 PM, Xiaodi Wu <[email protected]> wrote: > > Right. I don't think there's any plan currently to allow enum case > declarations of reserved keywords without backticks. The reasoning, IIUC, was > that use sites were far more common and in that context cases could be > distinguished by the leading dot. By contrast, declarations are made only > once. > > FWIW, this is implemented for all keywords and not just `default`, so > `.class` or even `.case` should work right now too. It seemed like the core > team wanted general solutions that can be implemented for all keywords, and a > general solution for declaring enum cases without backticks is probably not > possible, I think?
I still don’t see why not. What could possibly come after the ‘case’ in an enum declaration other than the name of the enum case itself? To my knowledge, the only modifier of an enum case is the “indirect” modifier, but that always comes *before* the “case” keyword, so there’s no ambiguity there. _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
