Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Perl's warts

by grinder (Bishop)
on Mar 21, 2001 at 23:19 UTC ( [id://66106]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl's warts
in thread Perl's warts

Apparently the author is not familiar with this idiom, though it's pretty common.

He does say

Sure, one could pass a reference to a hash with these key value pairs, and then decode the hash inside the subroutine. Again, this is asking the programmer to do what the language should intrinsically understand: in essence, to code around the language.

I missed this the first time I read the article. I'm kind of ambivalent about this way of thinking. I accept the argument as valid, but on the other hand it's not a whole lot of overhead (read: not much syntactic sugar required). The cookbook shows a number of compact techniques for doing this. Although when writing OO Perl, it really is a drag to have to write my $self = shift every single time.

What I have noticed with Perl is that I figure out very few tricks myself from first principles. Just about all of my mastery has come from reading books and other people's code. The only other language that I have observed this is C++. If you haven't read the Gang of Four book, and studied how the STL works, you'll only ever skim the surface.

--
g r i n d e r

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://66106]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found