-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 <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> 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'Brien via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>> 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'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) -> Int { ... }</div><div class="gmail_msg">roll(.`2d6`)</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I'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's certainly a much easier sell... How does "_" fit into this? I know `123_456` is a valid integer literal and that `_1` is a valid identifier. I don't know if `_1` is a valid integer literal.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I'd <i class="gmail_msg">like</i> to support purely numeric identifiers, but I can't think of a way around the ambiguity of `3.0`. Maybe only allow it if the enclosing type isn't ExpressibleByIntegerLiteral? It feels more than a bit odd, though, to have a property name's validity depend on whether or not it'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>