in reply to Re^8: Modern Perl and the Future of Perl
in thread Modern Perl and the Future of Perl
You have, perhaps, found the one good use for Perl::Critic. That of an individual programmer, say me or you or chromatic or John in post sales, can apply it (P::C) to a piece of our own old code, or a any piece of old code that we are about to do some work on, and enable everything. And then step through each of the gazillion bellyaches it produces turning them off as we dismiss them. Or leaving them enabled if we not yet ready to dismiss them. Until we eventually arrive a whatever subset is left that we cannot immediately dismiss as either a pointless warning or an acceptable risk.
At that point we have a list of things that we might have picked out anyway, but also some we might have missed. We've also forced ourselves (that emphasis is important), however breifly, and probably only regarding the first occurance of each, to actively rather than passively consider before dismissing the rest.
That process, could be beneficial in any number of ways. Not least because it would force us to read the whole code, at least superficially, rather than just dive into the bit where we think we need to go. And that is always good.
But that it not how anyone seems to be advocating its use. None. Nary a one.
The way its use is being advocated is for some person or core of people to sit around a table and consider each of its gazillion settings in turn and decide, once and for all and in the abstract, which of those all future (in-house, in-dept etc.) code will have to comply with. And that is wrong.
It's wrong in so many ways and at so many levels that it is pretty impossible to cover them all or even a good subset in a single, off the cuff post. But here's one; perhaps the most fundemental. And in someone elses words rather than mine:
In contrast, postmodernism puts the focus back onto the carpenter. You'll note that carpenters are allowed to choose whether or not to use hammers. They can use saws and tape measures if they choose, too. They have some amount of free will in the matter. They're allowed to be creative.
Every single feature in Perl, even the "bad" ones, was put there for a reason and has a purpose. It didn't fall out of the sky at random, or grow up from the depths of Hell for the devilment of it. Each was considered and ruminated and cogitated over and put into to deal with a particular situation, or set of particular situations. And whilst some of those features have fairly specific and limited uses, most have a variety of uses and once you start combining them, myriad uses.
My fundemental argument against P::C is that it is simply, really, actually impossible to whittle away any of Perl's features without throwing something useful, and in some limited situations possibly critical, away also. And it's naive and arrogant and disasterous to believe that you can, in one meeting or series of, in the abstract, account for and truely consider the implications of defining a complete set to which all future code must comply.
Why those who are advocating the use of P::C are doing so, is because they believe that their style has now evolved to the point of perfection. And it must therefore be a Good Thing if their style is enforced upon all code they have to deal with. Because it will benefit everybody. How many of those advocates have truely considered whether each of the individual considerations they are making are because it's truely good for their codebases--or just good for them?
How many of those decisions are because (as one other poster in a another discussion put it) $action if $condition; isn't being deprected in favour of if( $condition ) { $action; } simply because "they as former C++ programmers didn't grok it the first time they saw the former"? Or because "they prefer conditions to come before actions", or whatever other personal justifiction they have settled upon?
If you look carefully at the mountain of P::C extension modules, you can detect certain patterns in their directions.
They want the productivity. They want the immediacy. They want CPAN.
Above all they want the lack of a ISO standards commitee predefined coding standard--so that they can define their own standard.
But here's the kicker. If their bosses, team leaders, or management had applied a similar blanket automation enforcement of their (the bosses) preferences, opinions and style, upon them (the P::C advocates), when they (the latter) were just starting out. They probably wouldn't now be coding in Perl!
And finally, I bet if we could get the top ten (informed, thinking) P::C advocates to publish each of their P::C profiles, then you would get no two from ten that were identical, and less than 50% convergance across the whole set.
Now which of them, those king pins in their domains with their overruling authority, would relish writing code under their nearest co-advocates standard profile? Much less that of their most distant co-advocate's?
And much, much (much) less mine! Or at least one that I might come up with :)
Update: a late additional quote that I forgot then remembered.
How does Perl put the focus onto the creativity of the programmer? Very simple. Perl is humble. It doesn't try to tell the programmer how to program. It lets the programmer decide what rules today, and what sucks. It doesn't have any theoretical axes to grind. And where it has theoretical axes, it doesn't grind them. Perl doesn't have any agenda at all, other than to be maximally useful to the maximal number of people.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Modern Perl and the Future of Perl
by chromatic (Archbishop) on Dec 22, 2007 at 02:17 UTC | |
by BrowserUk (Patriarch) on Dec 22, 2007 at 03:24 UTC | |
by chromatic (Archbishop) on Dec 22, 2007 at 07:41 UTC | |
by BrowserUk (Patriarch) on Dec 22, 2007 at 09:17 UTC | |
by Cop (Initiate) on Dec 22, 2007 at 17:32 UTC | |
by Cop (Initiate) on Dec 22, 2007 at 06:13 UTC | |
by Cop (Initiate) on Dec 22, 2007 at 03:26 UTC |