[swift-evolution] [Discussion] Enum Leading Dot Prefixes

Jordan Rose jordan_rose at apple.com
Fri Feb 12 11:57:32 CST 2016


> On Feb 11, 2016, at 22:27 , David Waite via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Would it be worthwhile to expand this (or create another proposal) to deal with switch cases only allowing dot syntax for use with enum cases?

I would be against that. I like being able to use static members with shorthand.

textField.font = .systemFontOfSize(48)

switch point {
case .zero:
  print("origin")
case _ where point.x < 0:
  print("negative x")
default:
  print("uninteresting")
}

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160212/4eccdf2e/attachment.html>


More information about the swift-evolution mailing list