I mean, why can't we have this (which IMHO sticks to the principle of least surprise):
method do_internal :private (...) {...}
and then have it implemented with whatever mechanism that is deemed better, e.g. lexical immutable thingies in a glass safebox under the sea.
I can only think of a trade-off in efficiency (both lowercase perl programmer-wise and lowercase perl-wise), because that would probably require revising how method resolution is performed today and have this resolution go through a private list first, then a public one, in lack of a way to distinguish a private and public method at the time of calling (which seems something that programmers would be happy to hand over to the compiler/interpreter, I guess).
]]>I hope you will enjoy them!
]]>=begin IGNORE_THIS =over =item C<< private >> =item C<< dont_show >> =item C<< whatever >> =back =end IGNORE_THIS]]>
And oh! I really hope to see Learning Perl 6 spring to life! I opted for the "early versions" pledge because I'm too curious to see what it will be...
]]>I can't judge whether those suggestions made me a successful or at least better presenter, but they definitely make sense to me.
]]>The new subs in List::Util are OK but they (understandably) follow the syntax of the rest, which is less sugary. This seemed to be an important point in the OP. How much sugar you like is a matter of taste, of course.
I agree with Graham Knop and I consider any(@a) eq $x
better because I can also say any(@a) == $x
and any(@a) =~ $x
, which is needed in Perl5 to avoid all smart match hoop jumping. Sometimes DWIM just expands to Detail What It Means.
It allows you to mix junctions, although you have to be careful of what you want. It also seems to be aware that equality isn't commutative any more when you mix all and any (as in all items here have to be equal to at least one item there, that is different from any item here has to be equal to all items there).
If you're worried by the Perl6:: in the name, Stevan Little's has got you covered: This is a solid module which you can use right now in your Perl 5 code..
]]>