Sorry to glomm on to my own comments:

I think there’s a lot of reasonable push-back to requiring a default
case on non-exhaustive enums. I personally don’t want to see a “future
case” because I think it’s mystery-meat. However, in the happy path, as
a developer I do want *some* notification by the compiler that I may
need to handle a new case, even if my code is already in the wild
handling the case through a default. To fulfill Swift’s safety and
stability goals, it  needs to both avoid creating suddenly invalid code
at compile time and  avoid UB at runtime. The community should take note
that this all a bit of cutting  a Gordian knot on the part of the
language, but it's worthwhile to avoid adding cruft and bugs.
Sincerely,
  Zachary Waldowski
  z...@waldowski.me

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to