[Mpls-pm] Closure Code Samples

Robert Fischer rfischer at corradiation.net
Wed Oct 19 09:04:14 PDT 2005


>> I've read that article, and I'm unconvinced.  Yes, prototypes often do
>> things you might not intend them to do (e.g.: length(@arr)) -- on the
>> other hand, what would be the alternative?  Assuming length is designed
>> to
>
> What do you mean what's the alternative?  What's the point in the first
> place?  Perl's prototypes do so little that they're basically useless
> except for a few special cases.
>

They force context, catch errors like sin($a,$b,$c), do implicit
referencing, and prevent errors like "PI-1" becoming "PI(-1)", all of
which are major annoyances that you encounter without prototypes.  I
consider doing that a whole lot, and decidedly not useless.

In looking at Tom Christiansen's complaints more closely, I came to the
conclusion that Tom Christiansen secretly hates Perl, which was a
significant enough realization to post to my blog:

http://enfranchisedmind.com/blog/

~~ Robert Fischer.
rfischer at corradiation.net



More information about the Mpls-pm mailing list