3 ms·
Agree. Furthermore if you are going to split it, you want to make sure no one boxes a raw pizza because they added a bad switch statement or something, as that
by xmcqdpt2 3y ago
Agree. Furthermore if you are going to split it, you want to make sure no one boxes a raw pizza because they added a bad switch statement or something, as that would be clearly bad. So if you want a split version than you should use types to mark the transitions between states.
boxPizza should take a CookedPizza, and BakePizza should take a RawPizza and return a CookedPizza etc.