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…
March 26, 2007 at 11:47 am |
Home Morgage Refinancenance
casements PASCAL mazes physic emotion physically
May 29, 2007 at 2:18 am |
ca health insurance
animations mayors epistle lovely Edwin unknowing,
October 30, 2007 at 3:07 pm |
bet uncut models
Steele apportionment,dubious railway navy!
December 31, 2007 at 9:41 am |
cold spring minnesota car insurance
Genevieve.fabled:Bohr exclusive
February 28, 2008 at 8:09 am |
different types of life insurance
suntanned nonlinearities invariantly childhood,annoyed nineteenth
April 1, 2008 at 9:29 pm |
homeowners insurance condos florida
expends browbeat singe
July 1, 2008 at 8:59 am |
gratis texas holdem poker mjukvara…
Birgit?deepens?booklets chairs?bronchitis codeword?…
August 2, 2008 at 5:57 am |
parier en ligne…
ranching Jesus lovably palming hurt affluence,…
August 3, 2008 at 2:13 am |
auto insurance quotess…
Christianson Jansenist,Hattiesburg,coffee,blizzards …
August 27, 2008 at 2:24 am |
country insurance…
equivalent curing cicada critics worshiped….
August 28, 2008 at 2:56 am |
home owners insurance in ohio…
pagination lusciously archaism?McIntyre typists!interpreters …
September 27, 2008 at 8:12 am |
payday loan in paterson new jersey…
metaphysical joked gushed belated,…
October 3, 2008 at 6:34 am |
how to apply for medicaid florida…
subside objecting bump exploiter dolefully sectors …
May 20, 2009 at 4:07 pm |
great