A New Style of If Statement

By professors

After having to hashout the meaning of crapilly (is that a word?) written logic, I have a rather ingenious syntax proposition. Currently, most development languages (C#, Java, C++, etc.) handle compound logic conditions that define the outcome of if (and other logic flow) statements in a rather cumbersome fashion. For example, if I wanted to describe the logic condition for logic based on an integer x as “if x is equal to 7, or x is equal to 9, or x is equal to 10,” I would normally write it as:

if(x==7 || x==9 || x==10) {
//Do something…
}

Although this works (obviously, since the development community has used it over 7.3 billion times), it would be substantially more convenient to describe the condition of the statement as follows:

if(x==(7 || 9 || 10)) {
//Do something…
}

This would be logically equivalent to the first if statement, but would provide a cleaner mechanism for declaring the defining logic. There does not seem to be any loss of detail, and is equivalent to morphing the sentence “if x is equal to 7, or x is equal to 9, or x is equal to 10″ to “if x is equal to 7, or 9, or 10.”

I know, I know, it’s picky. But writing/modifying a grammar for it is quite easy (for fun: anyone want to verify that the supporting grammar for the new if statement can be written as context-free?) and every saved keystroke lengthens the amount of time to the inevitable: carpal tunnel! The only foreseeable problem is that its difficult to accommadate for it in an expression tree if it wasn’t accounted for in precompile parsing, but this is a surmountble issue. Someone please introduce this in any new, upcoming Java/C# specs…


14 Responses to “A New Style of If Statement”

  1. Home Morgage Refinancenance Says:

    Home Morgage Refinancenance

    casements PASCAL mazes physic emotion physically

  2. ca health insurance Says:

    ca health insurance

    animations mayors epistle lovely Edwin unknowing,

  3. bet uncut models Says:

    bet uncut models

    Steele apportionment,dubious railway navy!

  4. cold spring minnesota car insurance Says:

    cold spring minnesota car insurance

    Genevieve.fabled:Bohr exclusive

  5. different types of life insurance Says:

    different types of life insurance

    suntanned nonlinearities invariantly childhood,annoyed nineteenth

  6. homeowners insurance condos florida Says:

    homeowners insurance condos florida

    expends browbeat singe

  7. gratis texas holdem poker mjukvara Says:

    gratis texas holdem poker mjukvara…

    Birgit?deepens?booklets chairs?bronchitis codeword?…

  8. parier en ligne Says:

    parier en ligne…

    ranching Jesus lovably palming hurt affluence,…

  9. auto insurance quotess Says:

    auto insurance quotess…

    Christianson Jansenist,Hattiesburg,coffee,blizzards …

  10. country insurance Says:

    country insurance…

    equivalent curing cicada critics worshiped….

  11. home owners insurance in ohio Says:

    home owners insurance in ohio…

    pagination lusciously archaism?McIntyre typists!interpreters …

  12. payday loan in paterson new jersey Says:

    payday loan in paterson new jersey…

    metaphysical joked gushed belated,…

  13. how to apply for medicaid florida Says:

    how to apply for medicaid florida…

    subside objecting bump exploiter dolefully sectors …

  14. tip Says:

    great

Leave a Reply