[swift-evolution] [Proposal] Disallow redundant `Any<...>` constructs

Matthew Johnson matthew at anandabits.com
Fri May 20 20:58:05 CDT 2016


> The `Any<…>` here is acting like a type (actually, it *is* a type, just a slightly special type) and it should be capitalized like a type.

One more point around this comment.  While `any<MyProtocol>` is a type `any` is not a type.  `any` is a kind of type. We have classes, structs, enums, and existentials.  We don’t capitalize `struct`, `class`, or `enum`.  Why should we capitalize `any` just because it is often going to be declared ad-hoc (and again, I think it is worthwhile to give existential types a name in many cases, just as we give other types a name — preferring structs to tuples, for example).  Making `any` lowercase emphasizes the fact that it is a kind of type rather than a type.

I really don’t want to come across as argumentative here.  I’m just really trying to work out what is best for the language.  I will be very happy using a language with generalized existentials regardless of whether we capitalize the `a` or not.

-Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160520/f8698310/attachment.html>


More information about the swift-evolution mailing list