S03 says that hypers recurse into subarrays. 

That's a nice and useful feature, but that not-recursing is even more
useful. Especially given that many objects will probably does Array, you
want to be explicit about recursion.

S03 doesn't give a way to avoid recursion.

I suggested on #perl6 that standard hypers do not recurse, and a new
operator: double hypers. These are the same, but they do recurse. From
my point of view, hypers should operate on lists, not arrays. Recursive
hypers would work on arrays because arrays are single element lists.

Audrey agreed.

It would probably be useful to allow combinations of recursive and
non-recursive hypers.

    »+«    # do not dive into arrays
    »»+««  # do dive into arrays, on both sides
    »+««   # dive into arrays only on the RHS
    »»+«   # same, but LHS

    42, 15 »+ 1       # 43, 16
    
    ( 42, 15 ) »+ 1   # 43, 16
    
    [ 42, 15 ] »+ 1   # 2
    
    [ 42, 15 ] »»+ 1  # [ 43, 16 ]

The ASCII variant is a bit big, but that's okay huffmanwise, IMO.
Recursion can be a pretty big operation anyway. Being explicit about
that is good.
-- 
korajn salutojn,

  juerd waalboer:  perl hacker  <[EMAIL PROTECTED]>  <http://juerd.nl/sig>
  convolution:     ict solutions and consultancy <[EMAIL PROTECTED]>

Ik vertrouw stemcomputers niet.
Zie <http://www.wijvertrouwenstemcomputersniet.nl/>.

Reply via email to