On Fri, May 29, 2009 at 11:06:46PM -0700, Darren Duncan wrote: > Larry, did you choose = for assignment and == etc for comparison because > you thought that looked prettier, or because that was the C/etc > convention that you decided to copy?
Neither beauty nor convention, really. I chose it for the same reason that C chose it: Assignment is much more common than testing equality, so this is pure Huffman. This was specifically mentioned in the original rationale for the design of C, because by percentage there were more mathematicians in programming then than there are today. So there was certainly some pressure to use = for equality back in the day, and I give K&R credit for helping establish the Huffman principle. Certainly the Huffman principle was largely ignored by the designers of COBOL. The first time I saw that you call a subroutine with "perform", I said to myself, "Something's desperately wrong here. Why didn't they just use 'do'?" Which you'll notice is how Perl 1 called subs. Of course, eventually I figured out that two characters is still too long for that, so I changed it to 1 character, &, a little slow to realize that the correct answer was 0 characters... :) These days I try to be stupid about other things instead. Larry