From: "Hal E. Fulton" Date: 2001-05-16T13:02:27+09:00 Subject: [ruby-talk:15233] RCR Syndrome - half-serious idea Speaking of ideas to change Ruby, here's one. I'm *not* a strong advocate of this idea. I'm just speculating, letting neurons fire randomly in my brain. Most languages "short-circuit" the Boolean operators. Some don't. But almost all do one or the other. When I created a language as a project in grad school, I gave it *both* kinds of operators, just for the heck of it. A few years later, I discovered Eiffel, and was gratified to note that someone else thought the same way. The only drawback to short-circuiting, of course, is that some expressions may never be evaluated. Often you want that (especially if you're used to thinking that way). But what if you specifically want to evaluate them all? If we were going to add this to Ruby, I think capitalized operators (reserved words) would be the natural choice. (We already have the capitalized BEGIN and END.) Short-circuiting: if foo() && bar() && bam() then... # bar() and bam() may not execute if foo() and bar() and bam() then... # same thing Full evaluation: if foo() AND bar() AND bam() then... # bar() and bam() will always execute Just a thought. Hal