On Sunday, April 14, 2002, at 10:49 , BeardedDragon.org wrote:
[..]
> Anyway...  just my "unclear" ramblings of clarification while waking up.
> I still need my coffee.  hehehe.  :)

I have been following this thread as it has meandered into the desirement
to have perl taken seriously as a 'coding' language, and not just some
way to 'script around', and hence the return to the usual concerns about
'code maintainability' as well as 'performance'.

{ a part of the problem here is the usual prejudice that RealCoders[tm]
have for 'scripting' languages - and who tend to 'toss off' a script
with no concern about who will wind up maintaining it later on... As perl
has evolved forward - the 'all in one' nature of it being a 'scripting'
language and a 'coding' language has screwed up this simplistic prejudice.
In about the same way as the OO v. Proceduralist fights get bollock'd in 
perl.}

When I started coding in perl in 1990 - there was much ballyHooing about
the fact that it would 'solve' all the awkwardness of sed and awk - a
proposition that may actually be defendable on or about perl5.5.3... But
what I found peculiar - and still do - is that my habit of 'regular 
expressions'
is rooted in sed, not in perl - hence the subject line - since my
wayCoolPerlMonger would freak at any /bin/sh script that used sed, since
to him it was 'line noise' - whereas he never really worried about the
same 'line noise' if it were written in perl....

So one part of the problem may be that the more complex the regular
expression - the 'less obvious' it is to those who, while being elegant
programmers in their own right, may not have 'an eye for regular 
expressions'.

one fun case:

> s/href="([^"]*)"/"href=\"".(do { my $foo = $1; $foo =~ y# #_#; $foo 
> })."\""/ge;

while clearly true that it 'solved' the problem raised by a newBie
the question is whether the several lines of 'internal commenting'
that would be useful to explain WHY and HOW that worked is worth
the trade off in the process? { as a housemate noted of some old
device driver code 'glad I put the internal comments in, since I
didn't have to go and figure out what it did.....' and that of
course was written in a RealCodingLanguage[tm] }

The alternative angst for me is whether or not a part of the problem
is that those inclined to write interesting and esoteric code have
not yet run into the 'fun' of actually having to go back and maintain
the code line.... and in time will learn the hard way to write elegantly
so as not to hurt themselves when they are reading their code with
their bifocals.... In short, that as we look back on the folly of
our youth, we get to regret at leisure our wanton ways? Hence that
we should forgive the sins of youth in those about us???

ciao
drieux

---

Reply via email to