--On 24.08.2000 10:56 Uhr -0600 Tom Christiansen wrote:
>> The probably worst about these statements is that they look ugly.
>
> To the contrary: in the case (ahem) of the application of lc() on
> the comparison's operand, they look especially beautiful.
Depends on taste I guess...
>
>> Also,
>> they further complicate statements and they are counter-intuitive for
>> beginners - why should I change the case of variables if I only want
>> to compare them?
>
> Again, I reach the contrary conclusion: they say exactly what they
> are doing, rendering them clear and obvious to all involved. By
> your argument, one should not have to say
>
> abs($a) == abs($b)
>
> either, but should invent a sign-insensitive equality comparison
> instead of knowing how to use the extant == operator and abs function.
With the same argument we can drop -- and ++, and while we're at it,
the arithmetic minus in favor of +(-$num). In my consideration, a
case-insensitive equality check is a rather common operation in Perl
programs so it deserves its own operator.
> Power derives not from uncountably many special-purpose functions
> and syntax, but rather from the ability to combine primitive features
> *algorithmically* to arrive at the desired functionality. The
> factorial powers of combinatorics put to shame a merely linear increase
> in the number of available functions.
I'd use C then if I'd agree completely with this statement.
>> $a eq/i $b
>> $a cmp/i $b
>
> You want ugly, I'll give you ugly. That's ***UGLY***. It's a
> syntactic anomaly that does not fall out of anything else in the
> language. The analogy to m//i or s///g is a false one, as those
> are not functions
I still say it looks familiar even if it's a false analogy. Another
possibility would be to use cmpi and eqi
--
Markus Peter - SPiN GmbH
[EMAIL PROTECTED]