• thebestaquaman@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    2 days ago

    To be fair, I think massive “switchboards” can be relatively clean. The key is that each step contains little enough logic. 1500 lines of 13-14 cases means the average block was > 100 lines, and at that point I definitely agree that it should probably have been refactored a long time ago. Just splitting that into 13-14 smaller functions, and using the switchboard as a delegator could be completely fine.