Moritz Lenz writes:

> Richard Hainsworth wrote:
> 
> > I dont think the specification regarding 'reverse' has ever changed.
> 
> Actually it has changed. ... In Perl we usually have one operator per
> operation. ... reverse() violated that principle, by doing several
> different operations depending on the data type. So we split it up
> into .reverse (list reversal), .flip (string reversal) and .invert
> (key/value inversion).

Makes sense.

For the benefit of Perl 5 programmers used to string reverse it would be
nice to have a warning if reverse is invoked with exactly one string
argument (but not with an array which happens to contain a string as its
only element).

Smylers

Reply via email to