in reply to Re: How 'bout and argv pragma?
in thread How 'bout an argv pragma?

You have to remember - there isn't just one prototypical Perl programmer; there are several.

I personally believe that you're right in your premise but that your claim, namely that "Only one of those [kinds of Per programmers] uses @ARGV and <>," doesn't follow from it. Specifically, it's all a matter of interpretation of the expression "Perl programmer." It's officially ok, per $Larry's words to only use a subset of the language that fits one needs, in accordance with its pragmatic nature: OTOH such a use would rather define a "person who can hack away with Perl occasionally" or an "occasional Perl user" as opposed to a Perl programmer. Granted: the language is so vast one can hardly say to know it all, but I still both claim that there's a whole spectrum with the above incarnations as extremes and that *ARGV & C. are such basic constructs that not knowing about them would heavily tend to make one assigned towards the "occasional Perl user" end of it. It's like the Perl-style for loop: you can get away without knowing it, and only use C-style one. Perhaps it's even more explicit: but is it more readable? Would you consider such a person a Perl programmer?

See, to consider the opposite situation: I am a (mediocre) Perl programmer grown up as a hobbyst. Then they offered me a job, in which I had to work with databases: of course I had to learn some new techniques, specific modules and way of reasoning, but the framework was still that of the language I am familiar with. I wouldn't have been complete enough as a programmer, if I had not an overall knowledge of the language that would allow me to easily learn those other things: notice, "other things," not another language or another subset of the same language altogether.

Be explicit in what you're doing - maintainable code is the best code and you're not always your own maintainer. Pay it forward.

How explicit should I be? Should I want to be all that explicit I wouldn't use a dwimmy language. Should I handle my own mallocs?!? Naaah, that's an old story for me: I respect people who do, but I don't want to bother with those things myself any more.

Oh, and I do write perfectly maintainable code: maintainable by Perl programmers, but not necessarily Perl occasional users, and certainly not requiring them to be Perl gurus either.

Incidentally, the diamond operator is so popular that while it's going away in Perl 6 as a filehandle iterator, in favour of unary =, it's also coming back as the default handle for command line arguments.

--
If you can't understand the incipit, then please check the IPB Campaign.

Replies are listed 'Best First'.
Re^3: How 'bout and argv pragma?
by dragonchild (Archbishop) on May 29, 2008 at 03:24 UTC
    I consider myself to be an extremely heavy Perl programmer who is familiar enough with C, commandline arguments, and writes shell scripts in both bash and Perl on a semi-regular basis (less now than before). I still had to read the manual for the <> operator. Yes, it's dwimmy. Yes, it's good. But, I still comment usages of vec(), 4-arg splice(), and select(). Just because they are things I occasionally have to look up. The comment might just be a link to perldoc.perl.org, but that's often enough to point out that this code might be a tiny bit funky.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?