Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: A "but" operator.

by BrowserUk (Pope)
on Sep 27, 2004 at 18:35 UTC ( #394283=note: print w/ replies, xml ) Need Help??


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


Comment on Re: A "but" operator.
Download Code
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>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://394283]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2014-09-21 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls