[swift-evolution] [Proposal] Disallow redundant `Any<...>` constructs
brent at architechies.com
Fri May 20 18:56:38 CDT 2016
> Austin, what is your thought on switching to `any` rather than `Any` since it does not behave like a user-defined generic type? The convention is for types to be uppercase and keywords to be lowercase. This falls more into the category of a keyword and has its own behavior distinct from the behavior of all generic types. Making it stand out syntactically will help to make that clear.
You didn't ask me, but I'll weigh in: I'm not a fan.
* I think `Any` (without parameters) should be uppercase, and I don't think we should have both `Any` and `any<>` or `any`. Death to the typealias!
* If type-erasing structs like `AnySequence` are eventually subsumed by this syntax, I would prefer they be called `Any<Sequence>` instead of `any<Sequence>`.
* In the `willSet` vs. `willset` thread, I proposed a rule that keywords which fit into a particular syntactic slot should be capitalized like normal members of that slot. For instance, if `dynamicType` is a pseudo-property, it should be capitalized like a property. Since `Any<>` fits in the syntactic slot of a type, it should be capitalized like a type.
More information about the swift-evolution