http://www.perlmonks.org?node_id=394309


in reply to Re^2: A "but" operator.
in thread A "but" operator.

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

Replies are listed 'Best First'.
Re^4: A "but" operator.
by SpanishInquisition (Pilgrim) on Sep 27, 2004 at 19:44 UTC
    I believe you are thinking of "except". </grammar-nazi>

      No, I'm not.

      Anecdotal history suggests that Henry Ford's sales pitch for the Model T was "you can have any color you like; so long as it's black". </history_nazi> :)

      If I understand TimToady's statement of but being a mixin that allows you to contradict (override) early conditions or restraints, the analogy is that you take the guy's order for his model T, and allow him to specify whatever color he wishes; but you then override that by supplying a black one.


      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
        then it is in the meaning of &&?
        Boris