True, but that's exactly the kind of change to the API required to make it more compile-safe. I still managed to crash this API by not providing a .rawValue somewhere. I don't think applications need to crash on key-value errors.
An enum wouldn't be so bad if it also would use the associated value. Would make it impossible to set the wrong value at least.
Ahh right, NSUnderlineStyle... I totally thought that was improved in Swift 4, what a bummer. I have some unit tests in my apps that make sure I'm setting the .rawValue instead of the enum case itself, because that one does suck. I'm gonna file a bug.
An enum wouldn't be so bad if it also would use the associated value. Would make it impossible to set the wrong value at least.