3 ms·
The "case" and "default" overrides seem kinda dicey.
by microcolonel 10y ago
The "case" and "default" overrides seem kinda dicey.
- Tim61 10y agoYeah, that is probably what bothers me the most about this. I write C code almost everyday. I can't remember the last time I forgot a "break", but I do use fallthrough when it simplifies the logic. It also breaks even the simple case of having multiple labels for the same code. Also, the for-loop overrides are ugly and pointless, IMO.
- jonathankoren 10y agoYup. Congratulations kid. You broke fall-through, perhaps the biggest advantage of a switch over else-ifs.
- abecedarius 10y agoI defined the same macros but with different names, back when I still coded in C. I still think it's a good idea which tends to get reactions like "Ew! Wash your hands."