[swift-evolution] [Discussion] Modernizing Playground Literals
lists at maven.de
Tue Feb 16 11:31:40 CST 2016
> On 15 Feb 2016, at 21:16, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
> Presented for discussion and feedback. Thank you in advance for your thoughts.
> -- Erica
> Modernizing Playground Literals
Ignoring the fact that I think Erica’s proposal is an improvement over the current state, a more general solution would be something like user-defined literals in C++11 (with whatever syntax). A playground could then pre-import the definitions of any literal types it wants to support, without having to change the language / compiler any time a new literal type is added.
I’m not sure whether this use-case is so important (or I’m overlooking something basic) that these items need such special treatment (e.g. #-prefix); couldn’t one just offer global factory functions for the literals in question and treat them specifically in Xcode’s playground UI?
More information about the swift-evolution