in reply to A "but" operator.

P6 is destined to have a proctologist, though I don't think it has quite the meaning you are looking for.

The example that sticks in my brain is

my $x = 0 but true;

I know I run across other examples in the A|S|Enn, but their significance has been lost in the melee of other new stuff in the same examples. It'll probably click eventually.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

Replies are listed 'Best First'.
Re^2: A "but" operator.
by TimToady (Parson) on Sep 27, 2004 at 19:01 UTC
    The but operator in Perl 6 is really a mixin operator underneath. Or looking at it the other way around, mixins already have a strong component of "I wish to contradict something someone said earlier".

      Something like?

      my Model $T = Ford( color => any( @colors ) ) but 'black';

      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
        I believe you are thinking of "except". </grammar-nazi>