Home > C++ > The Bogus SE/SE Rule

The Bogus SE/SE Rule

Relatively recently, I participated in a debate with a peer regarding the sacredness of the Single Entry / Single Exit (SE/SE) “rule” of programming. I wish I had this eloquent Herb Sutter treatise on hand when it occurred:

SESE

Woot! Now that I’ve stashed the case against SE/SE nazi “enforcement” on this blawg, I’m armed and ready to confront the next brainwashed purist on the matter.

violatesese

Categories: C++ Tags: ,
  1. July 25, 2013 at 11:17 am

    You know what’s even funnier?

    I’ve seen people (purists/brainwashed) devs to suggest, rewriting:

    int_32t sum;

    for(const auto& el: vints)
    {
    if(el == 0)
    sum = 0;
    elseif(el==-1)
    throw…
    else
    sum += el
    }

    return sum;

    suggesting that for SE/SE variant… ahhhhh

  1. No trackbacks yet.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.