[swift-evolution] [Proposal Draft] Literal Syntax Protocols

Dmitri Gribenko gribozavr at gmail.com
Fri Jul 1 15:59:31 CDT 2016


On Fri, Jul 1, 2016 at 1:35 PM, Dave Abrahams via swift-evolution
<swift-evolution at swift.org> wrote:
> I think if `Syntax.IntegerLiteral` is actually unclear then the best
> cure is `ExpressibleAsIntegerLiteral` (no namespace needed).  None of
> the other suggestions I've seen describe what the protocol means as well
> as that.  I've asked Matthew to update the proposal accordingly.

I also like `ExpressibleAsIntegerLiteral`.  It uses the ~ible/~able
convention which suggests a capability, and when the name is worded
like this, it is definitely describing a capability of the type.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-evolution mailing list