• [^] # Re: tout lu mais

    Posté par (site web personnel, Mastodon) . En réponse au journal 50 mauvais conseils de codage pour développeur C++. Évalué à 7.

    Bon après moi, je trouve que rien ne battra le duff's device en terme de code spaghetti et il n'a pas besoin de goto.

    Ah si on peut faire pire, il y a les coroutines en C de Simon Tatham

    Of course, this trick violates every coding standard in the book. Try doing this in your company's code and you will probably be subject to a stern telling off if not disciplinary action! You have embedded unmatched braces in macros, used case within sub-blocks, and as for the crReturn macro with its terrifyingly disruptive contents . . . It's a wonder you haven't been fired on the spot for such irresponsible coding practice. You should be ashamed of yourself.
    Any coding standard which insists on syntactic clarity at the expense of algorithmic clarity should be rewritten. If your employer fires you for using this trick, tell them that repeatedly as the security staff drag you out of the building.