I use over and over this idiom in perl5:

   $a{$_}++ for @a;

This is nice and perlish but it gets easily pretty boring
when dealing with many list/arrays and counting hashes.

I thought overloading the += operator

   %a += @a;

Probably that operator should be smart enough to be fed with
a mixed list of array and hashes as well:

  %a += ( @a, %h);  #  would mean %a += ( @a, keys %h)

I am not to sure how one can use hyperators, well I meant the
hyped hyperoperators, to juggle with lists and counting hashes.
One may want to feed multiple arrays to a single hash or one
array to multiple hashes. To add some salt to the problem
"Multiple" can translate to an "array of" :

   my @ary_of_h of Hash; @ary_of_h += @a;

Having real types in Perl6 will allow to slice, dice, splice data
in many nice ways. Damian can even spice that with junctions.
Fear. Fear.



--
  stef

Reply via email to