[swift-evolution] Making `.self` After `Type` Optional
Adrian Zubarev
adrian.zubarev at devandartist.com
Fri May 6 02:19:00 CDT 2016
Wouldn’t this enforce enum cases and some static struct variables to be lowercase?
public enum UINavigationControllerOperation: Int {
case None
case Push
case Pop
}
public struct NSLayoutFormatOptions: OptionSetType {
public init(rawValue: UInt)
public static var AlignAllLeft: NSLayoutFormatOptions { get }
public static var AlignAllRight: NSLayoutFormatOptions { get }
// etc.
}
Is this really a welcome change? I mean I’d love to see the drop of `.self` magic from types, but not sure about the UppercaseTypes, lowercaseValue convention here.
--
Adrian Zubarev
Sent with Airmail
Am 6. Mai 2016 bei 09:08:57, Pyry Jahkola via swift-evolution (swift-evolution at swift.org) schrieb:
I understand why the alternative of changing the generic type parameter list symbols was rejected, to be consistent with other C based languages, but I don't understand why the following was rejected:
making the UppercaseTypes, lowercaseValues convention a syntactic requirement, as is done in ML and Haskell.
I see that as a good viable alternative.
+1, enforcing the initial character case of type and value identifiers would clear up the language IMO.
It would also mean we'd need to bridge all C APIs in correct case.
Also, in general +1 to getting rid of `.self`.
— Pyry
_______________________________________________
swift-evolution mailing list
swift-evolution at swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160506/3b11bba5/attachment-0001.html>
More information about the swift-evolution
mailing list