Damian Conway writes:

 > 
 > Not equivalent at all. C<$foo~>bar> means "append $foo to the argument list
 > of subroutine C<bar>". C<foo.bar> means "make C<$foo> the invocant for method 
 > <bar>".
 > 
 > Curiously enough, the confusions I'm hearing over this issue are, to me, the
 > strongest argument yet for using Andy's |> and <| symbols instead.
 > 
 > Damian
 > 

Proposal :( but may be this is just part of the above mentioned
confusion:) 

  *  we probably should distinguish between 
     + pseudo-pipes ( I spell them as :> and <: ) 
     + and right- and left- assignment operators ( I
       spell them ... => $var and $var <= ... ) . 
  
       these should be aware of distinction between assignment and
       binding -- so probably there have to be 2 forms of each ???
  
  * :> and <: should be thought of ( and probably actually are ) just
    ( special ) __commas__ in the following sense :

   @a :> sort { ... }    #==>      sort { ... } @a: 
   @a :> join "..."      #==>      join "..."   @a: 

   sort { ... } <:  @a   #==>      sort { ... } @a: 
   join "..."   <:  @a   #==>      join "..."   @a: 
   

so it seems that ( already discussed ) redunduncy of <: can be solved
by saying that 

  * <: is doing to the _following_ term _the_same_thing_ ( makes it an
    adverb ) as what ":" is doing to the _preceding_ term --- so <: is sort
    of "prefix" form special comma : .  
    that means that <: is "prefix" adverbial comma - and the verb is
    to be found _before_  the <:  comma . 

  * :> is different . it makes the _preceding_ term an adverb --- but
    the corresponding verb have to be searched _after_ the :> comma . 
  
  it seems that all the distinction between methods and subroutines is
  now handled if methods and subroutines know how to handle adverbial
  arguments. ( but this does not allow to place _usual_ arguments
  before the subroutine/method -- so probably there have to be another 
  comma ) 

  It seams  that with this in mind and usual precedence rules we can
  make multimethods enjoy the l2r notations. 

  ( $square :> init ) :> 
  ( $circle :> init ) :> do_something

  do_something <: ($square :> init)
               <: ($circle :> init) 
  

arcadi 

Reply via email to