On Sun, Feb 19, 2017, at 10:57 PM, Xiaodi Wu via swift-evolution wrote: > Left unsaid from my reply about enums is that implicit conversions > should absolutely be added. We already have this magic for one > particular enum, Optional.
I can only see a generalization of this being used for evil. Perhaps that's best left to be discussed on some other knock-down, drag-out thread. > I'm not arguing with you that enums are currently unsuitable. In fact > I entirely agree. But Chris Lattner and others have said (now I'm > paraphrasing, but I believe accurately) that they *should* be. What > will it take? At minimum, some way to opt into implicit conversions. > It's a no-brainer in my mind. > > Bottom line: the language needs one excellent way to model Foo | Bar | > Baz, not two or three mediocre workarounds. The core team has said > that they want that excellence to be built through enums. Let's do it. I don't understand how extending protocols to parallel the changes we already made to classes — and in line with what's planned for enums — is a mediocre workaround. I have low confidence in Evolution being able to produce a passable union type design in a meaningful amount of time, particularly for Swift 4 Phase 2; I also question their need in the first place. Sincerely, Zachary Waldowski z...@waldowski.me
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution