I am finding myself in a situation where the most elegant "swifty" solution
would be to allow enum extensions to add to existing case options. For example
lets say I'm using a library that has the following enum defined:
enum MyDirection {
case east, west
}
My app for example also makes use of north and south, so I would love to be
able to write:
extension MyDirection {
case north,south
}
In objective c, one would probably have defined constants like MyDirectionEast
etc... these would probably have been mapped to ints or strings so a consumer
of this library could have easily extended this to add additional
functionality, but using constants like that is not very "swifty"
I'm curious what the swift community thinks.
Thank you
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution