Hacker News new | past | comments | ask | show | jobs | submit login

As amw-zero pointed out though, a user could accidentally create the int type and it would only fail if you have runtime checking (which requires you to build it, either via a custom enum constructor that returns `error` or an `IsValid` function, which then require you to maintain the ValidEnums list).

Int types also don't give you any guards when deserializing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: