Luke Palmer <[EMAIL PROTECTED]> writes:

>> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>> From: Piers Cawley <[EMAIL PROTECTED]>
>> Date: Tue, 29 Oct 2002 05:45:01 +0000
>> X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/
>> 
>> Whilst I don't wish to get Medieval on your collective donkey I must
>> say that I'm really not sure of the utility of the proposed infix
>> superposition ops. I'm a big fan of any/all/one/none, I just think
>> that
>> 
>>     one(any($a, $b, $c), all($d, $e, $f))
>> 
>> Is a good deal more intention revealing than the superficially
>> appealing than
>> 
>>     ($a & $b & $c) ^ ( $d | $e | $f )
>> 
>> which takes rather more decoding. And if you *do* want to use such
>> operators, surely you could just do 
>> 
>>     use ops ':superpositions';
>> 
>> in an appropriate lexical scope. Am I missing something?
>
> Uh huh.  This:
>
>    if $x == 1 | 3 | 6 { print "Small triangular" }
>
> I imagine it will not take long for these to sink in to people's
> brains, and become used in very clever (and readable) ways.

So, if that's the way you're going to be using | in your code, just do
C<use ops ':superposistions'> at the top of your file, in the same way
as you do C<use strict> now. Or wrap it up in a policy file and do
C<use policy '...'>. 

> If you read | as "or," and & as "and," instead of trying to translate
> them to "any" and "all," things get very nice.

Again, I'm not denying the usefulness, just worried that we're jumping
through an awful lot of more or less ugly and complex syntactic hoops
to get this particular chunk of behaviour into perl 6, when you could,
instead, allow the behaviour to be pragma selectable without bending
the rest of the syntax to accommodate.

> Plus, a scripting (or, in the case of P6, high level) language with
> such small bitwise ops gives me the shivers.  C, sure, they're common.
> Perl, no, not usually.  I was even dissatisfied with them in C++,
> which is a high- low-level language.

Catch is, they're there now and useful, especially when you start
dealing with the outside world (C<O_RDWR | O_CREAT>  anyone?) 

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?

Reply via email to