Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6110565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:31:50+00:00 2026-05-23T14:31:50+00:00

At the company I work for, there has recently been a mandate that all

  • 0

At the company I work for, there has recently been a mandate that all ‘highly visibile’ boolean logic must be expressed in Disjunctive Normal Form.

So for instance (though the concept is language agnostic),

#if (defined(A) || defined( B )) || (defined(C) && defined(D))

had to be replaced with:

#if defined(A) || (defined(C) && defined(D)) || defined(B)

What is the motivation for mandating that code has to be expressed in this manner? What are the advantages?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:31:50+00:00Added an answer on May 23, 2026 at 2:31 pm

    The advantage is that expressing such logic in a canonical/normalized form everywhere within a codebase will (theoretically) make it easier for programmers to understand and maintain it.

    Without such a rule, some programmers are apt try to “optimize” an expression in such a way that it becomes difficult for a maintainer to unravel it. Also, a common form makes it easier to compose new expressions if that becomes necessary.

    (These advantages are debatable. As with any stylistic guideline, having a consistent rule to follow is more important than the choice of one rule over its alternatives.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The company that owns the company that I work for has recently decided unilaterally
I have recently started work at a company that has a website. The previous
I work for a company that makes application's in C#. recently we got a
There's been a lot of interest in Service-Oriented Architecture (SOA) at my company recently.
We've got a company wiki running Mediawiki on our intranet that has been in
My company has been using SVN, but has recently made the move to TFS
The company i work for has recently bought BizTalk 2010. The seller has us
I work for a company which has multiple websites, all of sites somehow share
The company I work for has an java application that runs on esmertec jbed
I'm a web developer. My company has a dev server that all of us

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.