Agreed. Even putting aside my concerns about overloading 'frozen', the @nonfrozen
spelling is, like @frozen
, quite general and plausibly promises more than just 'you can add enum cases.' For a general "maximum source compatibility" feature we might additionally want to be able to, say, add more associated values to an enum case, which users would have to account for with a case .enumCase(let val1, _, *)
syntax, or something.
So absent a desire to explore the space of what that "maximum source compatibility" feature should or shouldn't look like, I would lean towards a more narrow spelling that covers "this enum may add more cases in the future" without overpromising. (Or, alternatively, want to see an argument that if we ever did get a more general @nonfrozen
feature, "you can add an enum case" is the only thing we should support for enums).