4 ms·
A lot of people use ESLint and Prettier. If you look at the roadmap/issues for those products you'll see that some feature requests cannot be programed, but can
by gitfan86 5y ago
A lot of people use ESLint and Prettier. If you look at the roadmap/issues for those products you'll see that some feature requests cannot be programed, but can be understood without knowing the full context of the business and codebase.
At the same time, if you are fixing a critical bug and you use enum instead of boolean, who cares, just push the fix, but it doesn't hurt to have a gentle reminder show up in your github PR that it is an option to use boolean instead.
- altdataseller 5y agoVitamin, not painkiller. Just keep that in mind
- tialaramex 5y agoIn a decent language enumerated types are strictly better than booleans because they have names. Closed and Open, or Paid and Outstanding, or Safe and Dangerous are better than true and false unless you really meant true and false. my_bills(Paid) avoids the step of reading the function prototype to find out what my_bills(true) means. In some languages you can make piecemeal changes to upgrade from booleans because the language is happy to silently coerce between a two state Boolean and a two state enumerated type. This is probably bad news for correctness because it means my_bills(Open) might not even raise a warning but it's convenient.