• falsem@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I don’t like nesting single use functions.

    At a certain point this is necessary due to overall length. You don't want a single function that is hundreds of lines long - they suck to debug and to test. Single-use functions break that up into logical chunks that make it easier to understand.

    The moment I follow a function and it’s just another abstraction for more functions I start feeling dread.

    This can actually be ideal in many cases due to the Single-responsibility Principle. Think of the purpose of those functions as coordinating the workflow of the other functions.