@eniko is this about the balatro code? i honestly assumed that was autogenerated from an external tool or card editor.
also several hundred line switch statements aren’t disgusting, but it’s also not exactly great either. but yeah it’s hugely context specific. it makes sense in an interpreter where there might be speed or memory constraints or goals.
would it make sense for a web server app framework to do controller dispatching using a giant switch statement? probably not. easier to have some sort of dynamic dispatch to self registered handlers like in spring.
having had to scroll through a huge ass switch recently (dozens of cases, not hundreds thank god) your eyes just start to glaze over. it’s a sea of monotonous and repetitive looking blocks of code. it’s honestly claustrophobic but i admit that’s totally a vibes based assessment, not real engineering (whatever that means)