From: Ryan Leavengood Date: 2005-06-21T04:41:16+09:00 Subject: Re: x==1 vs 1==x Ben Giddings said: > I write for C compilers all the time, but when I write Ruby there are > still a lot of things I keep, even with its smarter interpreter. In > the end, I think using '=' as the assignment operator and '==' as the > comparison operator is bad human-interface design. What do you call > that key? "equals", not "assigns" or something, but it's hardly a > flaw unique to Ruby. :) Pascal has := for assignment and = for booleans, but I think the general consensus is that assignment happens more often than equality checking, so it makes sense that it gets the shorter symbol. Plus, let's live in reality here: if you write code like that (which I do from time to time), you are going to test it, see a problem, and solve it. Explicitly turning on warnings helps too (though it does not catch your example.) Still, the language cannot stop you from being a bad programmer. Something I've learned after being the primary "bug-fixer" at my company for a very long time is that you never assume something will work, you always test it. Of course I'm sure I'm preaching to the choir when writing the above on this list. Ryan