"Brent Dax" <[EMAIL PROTECTED]> writes:
> Mr. Nobody:
> # I have to wonder how many people actually like this syntax,
> # and how many only say they do because it's Damian Conway who
> # proposed it. And map/grep aren't "specialized syntax", you
>
> IIRC Damian also supports Unicode operators (and may have originated the
> idea), and obviously many people don't like them.
>
> # could do the same thing with a sub with a prototype of
> # (&block, *@list).
>
> Great. That could mean it won't work right for
> MyCustomArrayLikeThing.
Actually, it will, as I have discussed the LAST TIME this bloody
subject came up. Multiple dispatch is your friend.
map (&block, *@list) { @list.map(&block) }
map (&block, @array) { @array.map( &block ) }
etc. Remember most of this will be set up by default anyway, when you
come to implement MyCustomArrayLikeThing you *may* have to add a few
function definitions, or the fact that MyCustomArrayLikeThing inherits
form Array may just fix it for you anyway.