Chris Mattern <> wrote:
> kj wrote:
>
>>
>> I do a lot of Perl programming, and yet there are many Perl features
>> that I *never* find a use for, and I wonder whether this is because
>> these features are inherently not very useful, or it's me who is
>> being just too dense to realize what I'm missing.
There is another possibility:
or have you just not done a project that would have benefited
from the feature. (The "right tool for the job" thing.)
>> In decreasing
>> order "remoteness from everyday programming":
>>
>> 1. formats
>
> I actually used this once, but looking back at it, I should have
> just used printf.
That isn't enough if you need word-wrapping or page headers though.
So there are modules for getting that stuff.
I'd count this one as "never used". There are now better alternatives.
I seem to remember that they will not be in the core of Perl 6
either, which seems to reinforce that position.
>> 2. prototypes
>>
>> 3. operator overloading
>
> In fact, you're already using this; you just don't know it. Perl does a
> lot of behind-the-scenes stuff with overloading.
Right, but here we were talking "Perl programming" rather
than "perl programming".
That is, their usefulness at the Perl Program (programmer's API) level.
My take on the above 2:
Prototypes are a cure that can be worse than the disease, not used.
Operator overloading would most often introduce "startle factor",
so used only in very special circumstances, eg: when you are
implementing some domain-specific language in Perl.
>> 4. tied variables
>
> Now, this, on the other hand, is truly useful.
<aol> Me too! </aol>
--
Tad McClellan SGML consulting
Perl programming
Fort Worth, Texas