The purpose of the fail-able initializer was to avoid the switch statements. So yes, I can add a default initializer to fix that issue. But they I have to add the default initializer in all the enums I need.
Consider the following example. I’m developing a client app for a service, which is improving everyday. The API response for a field is a list of strings, like shifts in a production company (day shift, noon shift, night shift). Now for better usage within my app, while parsing the field, I define an enum with the three cases. I use switch statement and parse network response to enum. If the response is anything other than the expected three strings, in case that the company has added a new shift (say evening shift), I can use a base case in the enum.
To remove the switch case, I decide to use raw values for enums and use the fail-able initializer. But I don’t actually want it to return optional, so I write my own initializer and inside it, call the fail-able initializer and if it fails, I set the enum to base case.
So far so good, now consider I want to do the same for 20 fields. I have to write default initializers for 20 enums. Isn’t that too much of boiler plate code?