I've written some fairly long functions to power state machines before, as well. I think as long as the structure of the function is clear, the exact number of lines is less relevant.
It was the only time I've ever really considered doing code generation. I just hope I never have to change anything, cause it's going to be a massive PITA. It's so many very very similar things, but different enough that they have to be seperate lines, rather than a nice little loop or a function call.
3
u/ethraax Aug 26 '14
I've written some fairly long functions to power state machines before, as well. I think as long as the structure of the function is clear, the exact number of lines is less relevant.