-1<br><br>Something like `42` will make things confusing.<br><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 9, 2017 at 5:53 PM David Sweeris via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">On Mar 9, 2017, at 04:40, Ross O&#39;Brien via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg"><br class="gmail_msg"></div><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">I could see a purpose for identifiers which started numbers but weren&#39;t entirely numerical.<div class="gmail_msg">e.g.<br class="gmail_msg"></div><div class="gmail_msg">enum Dimensions { case `2D`, `3D` }</div><div class="gmail_msg">enum DiceRoll { case d6, `2d6` }</div><div class="gmail_msg">func roll(dice: DiceRoll) -&gt; Int { ... }</div><div class="gmail_msg">roll(.`2d6`)</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I&#39;m not sure I see one for identifiers which are entirely numerical.</div></div></div></blockquote><br class="gmail_msg"></div><div dir="auto" class="gmail_msg"><div class="gmail_msg">That&#39;s certainly a much easier sell... How does &quot;_&quot; fit into this? I know `123_456` is a valid integer literal and that `_1` is a valid identifier. I don&#39;t know if `_1` is a valid integer literal.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I&#39;d <i class="gmail_msg">like</i> to support purely numeric identifiers, but I can&#39;t think of a way around the ambiguity of `3.0`. Maybe only allow it if the enclosing type isn&#39;t ExpressibleByIntegerLiteral? It feels more than a bit odd, though, to have a property name&#39;s validity depend on whether or not it&#39;s in a ExpressibleByIntegerLiteral type.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">- Dave Sweeris</div><div class="gmail_msg"><br class="gmail_msg"></div></div>_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div>