[ENH] Magnitude >> ?

Lex Spoon lex at cc.gatech.edu
Fri Feb 13 15:46:02 UTC 2004


Okay, I'll bite.  The proposal is plenty small that we should be able to
have a few hundred messages of discussion.

First, I don't like these coded results.  It irritates me every time I
use C's strcmp.  If simply comparing with < and > are inappropriate for
the code in question, then can't we come up with *some* symbolic
representation?  #< and #> and #= would be one reasonable way to go, but
I'd prefer even more that we have three Comparison classes and that the
results were LessThan, GreaterThan, and Equal.  Then, you can do more
things with the result of a comparison, like sending them
#isLessOrEqual.

Second, why #? ?  I've never seen this symbol used that way.  In
general, it seems better to avoid uncommon binary operators.  In this
case, how about a textual name like #comparison: ?


-Lex



More information about the Squeak-dev mailing list