I thought your suggestion of IntegerLiteralExpressible (with or without Syntax) was nice too.<br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 1, 2016 at 15:35 Dave Abrahams 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"><br>
on Fri Jul 01 2016, Erica Sadun <erica-AT-ericasadun.com> wrote:<br>
<br>
> The best way to pass the Dave Test is to ask him directly, for example:<br>
><br>
> Dave:<br>
><br>
> Do you think the stdlib team would be okay with a naming scheme like<br>
> Syntax.Literal.ArrayProtocol, Syntax.Literal.IntegerProtocol, etc. We think<br>
> this produces a clear description of the conformant role and one that is unlikely to be<br>
> misinterpreted. It may read less fluently but it's also less subject<br>
> to confusing users.<br>
<br>
No. IMO Putting “Protocol” in the name just adds redundant type<br>
information that doesn't help readability.<br>
<br>
> This naming scheme uses the Syntax namespacing, and creates a Literal<br>
> subspace. Each protocol is named as "XXXXProtocol". This introduction<br>
> a distinction between "This is/can be used as an integer literal" and<br>
> "Conforming to this protocol ensures that an instance of the type can<br>
> be written as an integer literal".<br>
><br>
> The problem with earlier approximations was that people saw<br>
> "Syntax.IntegerLiteralXXX" and thought the typed could be substituted<br>
> into expressions where an integer literal was used, and not that an<br>
> integer literal could be be used to write an instance of the type.<br>
><br>
> So what do (and your team) think of this idea?<br>
<br>
I think if `Syntax.IntegerLiteral` is actually unclear then the best<br>
cure is `ExpressibleAsIntegerLiteral` (no namespace needed). None of<br>
the other suggestions I've seen describe what the protocol means as well<br>
as that. I've asked Matthew to update the proposal accordingly.<br>
<br>
><br>
> -- Adrian (and Erica)<br>
><br>
>> On Jul 1, 2016, at 2:08 AM, Adrian Zubarev via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
>><br>
>> We haven’t pass the dave test yet? :D<br>
>><br>
>> Still curious what he’d say about Syntax.Literal.*Protocol<br>
>><br>
>> One more question:<br>
>><br>
>> What can the namespace Syntax could be used for except for literals, any idea? (I have no clue.)<br>
><br>
<br>
--<br>
Dave<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>