5 ms·
As the other commenter mentioned, I hope this is an excersize in trolling. Please don't do this when using enums. > Free-form text firle to hold the other val
by bilekas 2y ago
As the other commenter mentioned, I hope this is an excersize in trolling.
Please don't do this when using enums.
> Free-form text firle to hold the other value
> revise your enum as necessary, while migrating the dat
Both instances would defeat the purpose of an enum..
As for the original post, my 2cents are valued enums.
{
Other = 0,
Vanilla = 1,
Chocolate = 2,
Strawberry = 3
}
In this case it allows some flexibility to add later while still being able to make use of 0 (Other). Or maybe I missed the OP's point ?
- esafak 2y agoWith a form you will have an empirical basis to determine what the missing enum values should be, and the user won't enter any text unless necessary.
- bilekas 2y ago> and the user won't enter any text unless necessary You are underestimating users' ability to ignore non strict constraints. Also when I can, why would I not increase my compile time checking ? There are very good reasons to use Enums, you seem to just want to ignore those reasons.
- esafak 2y agoI'm not ignoring enumerations. I'm supplementing the existing options with a text field rather than shoehorning everything into an uninformative "other" value. I acknowledge your point about the user ignoring constraints.
- bilekas 2y agoInfact you're shoe horning in your agenda to enums. Maybe vectorised strings make sense for AI as your start up is working on, but we are talking different reasons and definitely different use case scenarios.