4 ms·
The problem is that production code never looks like the toy problem you can reduce it to. Someone could write the exact same thing but make it look reasonable,
by TheRealPomax 9y ago
The problem is that production code never looks like the toy problem you can reduce it to. Someone could write the exact same thing but make it look reasonable, or even "a sweet hack", using an object property getter instead of a function to move something along in a finite state machine:
if (state.step == DFA.INITIALIZED && state.step == DFA.RUNNING) {
...
}
- earenndil 9y agoIn this case they should use bitfields and bitflags.
- TheRealPomax 9y agoOf course you should. No "look at this cool hack" exists that doesn't have a safer, easier to trace equivalent. Doesn't mean you won't find those hacks in a million code bases used in production, though, and a professional knowledge of "yeah.. okay that's possible, but come on" isn't a bad thing to have.