<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Jul 10, 2016, at 11:43 PM, Zach Waldowski via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class="">


<title class=""></title>

<div class=""><div style="font-family:Arial;" class="">I share the concern with others about the usefulness of these, but I also like your note about standardizing syntax, and really like that these merge together all the different syntaxes for literals we've seen.<br class=""></div></div></div></blockquote><div><br class=""></div>Literals enable you to write cross platform code with a minimum of&nbsp;</div><div>redundant and platform-configured code.</div><div><br class=""></div><div>In today's Swift, you can say: &nbsp; let myColor = color literal and that code is&nbsp;</div><div>cross-compatible for all Apple platforms, whether UIColor, NSColor, and SKColor.</div><div>If you write that same request as let myColor = UIColor(...), it will no longer&nbsp;</div><div>compile on Cocoa.</div><div><br class=""></div><div>I'm proposing to extend these existing behaviors to create common code inherently&nbsp;</div><div>universal tasks with common structure: NSFont/UIFont, point2/CGPoint/NSPoint, etc</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div class="">
<div style="font-family:Arial;" class="">To that end, I'd like to modestly suggest that #literal.foo (as already written in the proposal) should be the canonical form of a literal in source text, whereas #foo is the one you see used in the code editor.</div></div></div></blockquote><div><br class=""></div>I've already filed radars asking that the code editor let you see the raw unrendered literals</div><div>and heartily encourage duped radars to support that end.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div style="font-family:Arial;" class=""> I'm not a fan of namespacing in #literal, because every literal should obviously be a literal; I wouldn't ever recommend numerals fall under this proposal as written, for instance.</div></div></div></blockquote><div><br class=""></div><div>The core team has suggested they'd like to use namespacing, especially with related</div><div>items that could otherwise spread and grow in an unmanaged way.</div></div><br class=""></body></html>