On 2009-May-29, at 7:53 pm, Darren Duncan wrote:
Thirdly, there are I'm sure a number of other aliases that could be added to other ops, such as ≤ and ≥ for <= and >=, and ≠ for one of the inequality operators, although that last one would probably make more sense if = was the equality test operator, so maybe best to avoid ≠ then.
Probably. I would really like to see the "obvious" symbols defined, though, for two reasons:
1) Being able to use real symbols (e.g. ≤ instead of crude ASCII approximations) will make Perl code look ever so pretty and make all the other kids envious. (Envy is, of course, one the great programmers' virtues, the one that makes us steal all the best bits from other languages!)
2) It will discourage people from abusing operators that already have well-defined standard meanings. For example, if there is no ∑, somebody might be tempted to use it for multiplication; or to use √ for checking something; or + for concatenating strings, etc.
However, I think some set ops could also be used with hashes. For example, an alternate way of spelling "exists %foo{$bar}" is "$bar ∈ %foo" or "%foo ∋ $bar".
I think that one's ambiguous as to whether $bar exists as a key or a value.
$bar ∈ @foo; $bar ∈ %foo.keys; $bar ∈ %foo.values; ∃ %foo{bar} -David