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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: