<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 26, 2016, at 10:11 AM, Hooman Mehr &lt;<a href="mailto:hooman@mac.com" class="">hooman@mac.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Syntax by itself is not clear enough. Appending Initializable makes it too long.&nbsp;</div><div class=""><br class=""></div><div class="">We can replace Syntax with LiteralSyntax to clarify. Then we will have:</div><div class=""><br class=""></div><div class="">extension MyNumber: LiteralSyntax.Integer, LiteralSyntax.Float { /*…*/ }<br class=""><div class=""><br class=""></div><div class="">Better yet, to address the valid concern of doing something so different and hack-like for literals, how about simply <b class="">renaming *LiteralConvertible protocols to *LiteralSyntax or LiteralSyntax*.</b> The key is the <b class="">LiteralSyntax</b> phrase which (I think) is the clearest short phrase we can get to communicate the intent. Look: It is right there in the title!</div></div></div></div></blockquote><div><br class=""></div><div>This looks reasonable if you only focus on the existing protocols. &nbsp;However, I believe the intent of this namespace is that it can support any syntax-related protocols that might emerge in the future whether they are related to literals or not. &nbsp;With that in mind, I don’t think `LiteralSyntax` will fly as it isn’t general enough to support that.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 23, 2016, at 8:31 AM, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I have completed a draft of a proposal to move the `*LiteralConvertible` protocols into a `Syntax` namespace as suggested by the standard library team.&nbsp;<div class=""><br class=""></div><div class="">The draft can be found here:&nbsp;<a href="https://gist.github.com/anandabits/99dad2305d310874bd613b72b14eee56" class="">https://gist.github.com/anandabits/99dad2305d310874bd613b72b14eee56</a>. &nbsp;It is also included below.</div><div class=""><br class=""></div><div class="">I will submit a PR in the next day or two after incorporating any feedback.</div><div class=""><br class=""></div><div class="">-Matthew</div><div class=""><br class=""></div><div class=""><h1 id="literalsyntaxprotocols" style="font-size: 37px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Literal Syntax Protocols</h1><ul style="margin-top: 21px; margin-bottom: 21px; padding-left: 1.5em; color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 15px;" class=""><li style="font-size: 17px;" class="">Proposal:&nbsp;<a href="file:///Users/Matthew/Library/Containers/com.brettterpstra.marked2/Data/Library/Caches/Marked%202/Watchers/NNNN-literal-syntax-protocols.md" style="color: rgb(13, 110, 161); text-decoration: none; transition: color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out;" class="">SE-NNNN</a></li><li style="font-size: 17px;" class="">Author:&nbsp;<a href="https://github.com/anandabits" style="color: rgb(13, 110, 161); text-decoration: none; transition: color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out;" class="">Matthew Johnson</a></li><li style="font-size: 17px;" class="">Status:&nbsp;<strong style="line-height: 1;" class="">Awaiting review</strong></li><li style="font-size: 17px;" class="">Review manager: TBD</li></ul><h2 id="introduction" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Introduction</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">This proposal renames the&nbsp;<code style="line-height: 1;" class="">*LiteralConvertible</code>&nbsp;protocols to&nbsp;<code style="line-height: 1;" class="">Syntax.*Literal</code>.&nbsp;</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Swift-evolution thread:&nbsp;<a href="http://thread.gmane.org/gmane.comp.lang.swift.evolution/21290" style="color: rgb(13, 110, 161); text-decoration: none; transition: color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out;" class="">Revisiting SE–0041 Names</a></p><h2 id="motivation" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Motivation</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">The standard library currently has protocols that use the term&nbsp;<code style="line-height: 1;" class="">Convertible</code>&nbsp;in two different ways. The&nbsp;<code style="line-height: 1;" class="">*LiteralConvertible</code>&nbsp;protocols use the meaning of converting&nbsp;<em style="line-height: 1;" class="">from</em>&nbsp;a literal. The&nbsp;<code style="line-height: 1;" class="">Custom(Debug)StringConvertible</code>&nbsp;protocols use the meaning of converting&nbsp;<em style="line-height: 1;" class="">to</em>&nbsp;a&nbsp;<code style="line-height: 1;" class="">String</code>. This causes confusion for developers attempting to name their own protocols following the precedence established by the standard library.</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Further, the standard library team has observed:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px;" class=""><code class="applescript hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); height: auto; background-position: initial initial; background-repeat: initial initial;">The <span class="hljs-string" style="color: rgb(221, 17, 68);">"literal"</span> protocols are <span class="hljs-keyword" style="font-weight: bold;">not</span> <span class="hljs-keyword" style="font-weight: bold;">about</span> conversion, they are <span class="hljs-keyword" style="font-weight: bold;">about</span> adopting a certain syntax provided <span class="hljs-keyword" style="font-weight: bold;">by</span> <span class="hljs-keyword" style="font-weight: bold;">the</span> language.  <span class="hljs-string" style="color: rgb(221, 17, 68);">"Convertible"</span> <span class="hljs-keyword" style="font-weight: bold;">in</span> <span class="hljs-keyword" style="font-weight: bold;">the</span> <span class="hljs-property">name</span> <span class="hljs-keyword" style="font-weight: bold;">is</span> a red herring: a type can't be convertible <span class="hljs-keyword" style="font-weight: bold;">from</span> an <span class="hljs-type">integer</span> literal because there <span class="hljs-keyword" style="font-weight: bold;">is</span> no <span class="hljs-string" style="color: rgb(221, 17, 68);">"IntegerLiteral"</span> entity <span class="hljs-keyword" style="font-weight: bold;">in</span> <span class="hljs-keyword" style="font-weight: bold;">the</span> type system.  The literal *becomes* typed <span class="hljs-keyword" style="font-weight: bold;">as</span> <span class="hljs-keyword" style="font-weight: bold;">the</span> corresponding literal type (e.g., Int <span class="hljs-keyword" style="font-weight: bold;">or</span> String), <span class="hljs-keyword" style="font-weight: bold;">and</span> <span class="hljs-keyword" style="font-weight: bold;">as</span> far <span class="hljs-keyword" style="font-weight: bold;">as</span> <span class="hljs-keyword" style="font-weight: bold;">the</span> user <span class="hljs-keyword" style="font-weight: bold;">at</span> <span class="hljs-keyword" style="font-weight: bold;">the</span> call site <span class="hljs-keyword" style="font-weight: bold;">is</span> concerned, there <span class="hljs-keyword" style="font-weight: bold;">is</span> no visible conversion (even <span class="hljs-keyword" style="font-weight: bold;">if</span> one <span class="hljs-keyword" style="font-weight: bold;">is</span> happening <span class="hljs-keyword" style="font-weight: bold;">behind</span> <span class="hljs-keyword" style="font-weight: bold;">the</span> scenes)
</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0041-conversion-protocol-conventions.md" style="color: rgb(13, 110, 161); text-decoration: none; transition: color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out;" class="">An earlier proposal</a>&nbsp;was intended to address the first problem by introducing strong naming conventions for three kinds of conversion protocols (<em style="line-height: 1;" class="">from</em>,&nbsp;<em style="line-height: 1;" class="">to</em>, and&nbsp;<em style="line-height: 1;" class="">bidirectional</em>). The review highlighted the difficulity in establishing conventions that everyone is happy with. This proposal takes a different approach to solving the problem that originally inspired that proposal while also solving the awkwardness of the current names described by the standard library team.</p><h2 id="proposedsolution" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Proposed solution</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">This proposal addresses both problems by introducing a&nbsp;<code style="line-height: 1;" class="">Syntax</code>&nbsp;“namespace” and moving the&nbsp;<code style="line-height: 1;" class="">*LiteralConvertible</code>&nbsp;protocols into that “namespace” while also renaming them. The proposal&nbsp;<strong style="line-height: 1;" class="">does not</strong>&nbsp;make any changes to the requirements of the protocols.</p><h2 id="detaileddesign" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Detailed design</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">All of the&nbsp;<code style="line-height: 1;" class="">*LiteralConvertible</code>&nbsp;protocols will receive new&nbsp;<code style="line-height: 1;" class="">*Literal</code>&nbsp;names inside a&nbsp;<code style="line-height: 1;" class="">Syntax</code>namespace.&nbsp;</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">This namespace will initially be implemented using a case-less&nbsp;<code style="line-height: 1;" class="">enum</code>, but this detail may change in the future if submodules or namespaces are added to Swift. Swift does not currently allow protocols to be declared inside the scope of a type. In order to work around this limitation the protocols themselves will be declared using underscore-prefixed names internal to the standard library. Typealiases inside the&nbsp;<code style="line-height: 1;" class="">Syntax</code>&nbsp;enum will declare the names intended to be visible to user code.</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">This proposal does not change any requirements of these protocols. All requirements of all&nbsp;<code style="line-height: 1;" class="">*LiteralConvertible</code>&nbsp;protocols will remain exactly the same.</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">The following protocol declarations and names:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px;" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); height: auto; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">NilLiteralConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">BooleanLiteralConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">FloatLiteralConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">IntegerLiteralConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">UnicodeScalarLiteralConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">ExtendedGraphemeClusterConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">StringLiteralLiteralConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">StringInterpolationLiteralConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">ArrayLiteralConvertible</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">DictionaryLiteralConvertible</span> </span>{ ... }</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Are changed as follows:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px;" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); height: auto; background-position: initial initial; background-repeat: initial initial;">
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_NilLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_BooleanLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_IntegerLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_FloatLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_UnicodeScalarLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_ExtendedGraphemeClusterLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_StringLiteralLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_StringInterpolationLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_ArrayLiteralSyntax</span> </span>{ ... }
<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">protocol</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">_DictionaryLiteralSyntax</span> </span>{ ... }

<span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">/* closed */</span> <span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">enum</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">Syntax</span> </span>{
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">NilLiteral</span> = _NilLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">BooleanLiteral</span> = _BooleanLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">IntegerLiteral</span> = _IntegerLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">FloatLiteral</span> = _FloatLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">UnicodeScalarLiteral</span> = _UnicodeScalarLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">ExtendedGraphemeClusterLiteral</span> = _ExtendedGraphemeClusterLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">StringLiteralLiteral</span> = _StringLiteralLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">StringInterplolationLiteral</span> = _StringInterpolationLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">ArrayrLiteral</span> = _ArrayLiteralSyntax
  <span class="hljs-keyword" style="font-weight: bold;">public</span> <span class="hljs-keyword" style="font-weight: bold;">typealias</span> <span class="hljs-type">DictionaryLiteral</span> = _DictionaryLiteralSyntax
}</code></pre><h2 id="impactonexistingcode" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Impact on existing code</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">All code that references any of the&nbsp;<code style="line-height: 1;" class="">*LiteralConvertible</code>&nbsp;protocols will need to be modified to reference the protocol via the new&nbsp;<code style="line-height: 1;" class="">Syntax.*Literal</code>&nbsp;name.</p><h2 id="alternativesconsidered" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Alternatives considered</h2><h3 id="protocolnames" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Protocol names</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Several commenters have suggested that the names in this proposal are confusing at the site of use:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px;" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); height: auto; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">struct</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">Foo</span>: <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">Syntax</span>.<span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">IntegerLiteral</span> </span>{ ... }</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">One alternative naming scheme would emphasize the semantic of initializing the type with a literal:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px;" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); height: auto; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-class"><span class="hljs-keyword" style="font-weight: bold;">struct</span> <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">Foo</span>: <span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">Syntax</span>.<span class="hljs-title" style="color: rgb(68, 85, 136); font-weight: bold;">IntegerLiteralInitializable</span> </span>{ ... }</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Discussion of the pros and cons of the proposed and alternative naming schemes is encouraged. The core team should feel free to make a final decision on the exact naming scheme used if they choose to accept this proposal.</p><h3 id="previousproposal" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Previous proposal</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">This proposal is a follow up to&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0041-conversion-protocol-conventions.md" style="color: rgb(13, 110, 161); text-decoration: none; transition: color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out;" class="">Updating Protocol Naming Conventions for Conversions</a>. Many related alternatives were explored during the discussion and review of that proposal.</p><h2 id="acknowledgements" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Acknowledgements</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">The design described in this proposal was suggested by Dave Abrahams, Dmitri Gribenko, and Maxim Moiseev.</p></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></div></div></div></blockquote></div><br class=""></body></html>