The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

J

Joachim Durchholz

Twisted said:
After all, you can't really take a language seriously if
it's either impossible to write unmaintainable code in it

That's true for any language.
Substitute "not straightforward" for "impossible", and you have a
condition that actually distinguishes languages.
> OR impossible to write maintainable code in it.

It is possible to write maintainable Perl.
It's just too easy to write unmaintainable Perl.
Also, a Perl "golfer" and an intermediate Perl programmer will have
quite different ideas about what idioms should be considered
maintainable. (I consider Perl's mantra of "many ways to express it" to
be a weakness, not a strength, since it lengthens the learning curve
considerably and doesn't buy much. YMMV.)

Regards,
Jo
 
T

Twisted

It is possible to write maintainable Perl.

Interesting (spoken in the tone of someone hearing about a purported
sighting of Bigfoot, or maybe a UFO).

Still, extraordinary claims require extraordinary evidence. (And no, a
fuzzy picture of something that might be a giant serpent-like thing in
the loch, or equivalent, does not constitute "extraordinary
evidence".)
 
J

Joachim Durchholz

Twisted said:
Interesting (spoken in the tone of someone hearing about a purported
sighting of Bigfoot, or maybe a UFO).

Still, extraordinary claims require extraordinary evidence. (And no, a
fuzzy picture of something that might be a giant serpent-like thing in
the loch, or equivalent, does not constitute "extraordinary
evidence".)

There's enough Perl code around. Including some that's been reported as
maintainable and well-maintained.
I haven't looked too deeply into it, but what I have seen from e.g.
Webmin looked quite clear and straightforward to me. (Real Programmers
can write Fortran code in any language - and they can write Pascal code
in any language...)

Perl code *can* resemble line noise. I don't like the language. I think
Larry and the Perl community have been getting some priorities very
wrong over time (and other things very right as well: take a look at the
regex redesign for Perl 6, for example - it's all shades of grey, not
black-and-white).

Regards,
Jo
 
T

Tim Bradshaw

Interesting (spoken in the tone of someone hearing about a purported
sighting of Bigfoot, or maybe a UFO).

I think it's just obvious that this is the case. What would *stop*
you writing maintainable Perl?
 
P

Patricia Shanahan

Twisted said:
Interesting (spoken in the tone of someone hearing about a purported
sighting of Bigfoot, or maybe a UFO).

Still, extraordinary claims require extraordinary evidence. (And no, a
fuzzy picture of something that might be a giant serpent-like thing in
the loch, or equivalent, does not constitute "extraordinary
evidence".)

How about "I caught a very small one, but it belonged to a former
employer, so I couldn't keep it for display."?

I wrote a Perl script to process logic analyzer traces for some hardware
engineers. While I was out of the office, they found they needed to
process a new record type. They didn't want to delay their work until I
got back, and one of the EEs knew Perl, so he modified my script.

The change was done correctly. It not only worked. Except for a couple
of comments calling my attention to the changes, it looked as though
the new record type had always been there.

Patricia
 
T

Twisted

I think it's just obvious that this is the case. What would *stop*
you writing maintainable Perl?

For starters, the fact that there are about six zillion obscure
operators represented by punctuation marks, instead of a dozen or so.
More generally, the fact that it comes out looking like modem barf,
and modem barf is unmaintainable. ;)
 
T

Twisted

I wrote a Perl script to process logic analyzer traces for some hardware
engineers. While I was out of the office, they found they needed to
process a new record type. They didn't want to delay their work until I
got back, and one of the EEs knew Perl, so he modified my script.

The change was done correctly. It not only worked. Except for a couple
of comments calling my attention to the changes, it looked as though
the new record type had always been there.

*blinks*

Hallelujah! It's a miracle! Praise be the Lord! This must surely be a
sign...

a sign of the End Times. :p
 
J

Joachim Durchholz

Twisted said:
For starters, the fact that there are about six zillion obscure
operators represented by punctuation marks, instead of a dozen or so.
More generally, the fact that it comes out looking like modem barf,
and modem barf is unmaintainable. ;)

You can write Perl that uses just a dozen or so punctuation marks, so
that doesn't stop you (or anybody else) from writing maintainable Perl.
You haven't looked into the Webmin code that I gave for an example, have
you? You'd have seen code that's quite far from line noise. (But
sticking with prejudice can be more fun, I know...)

If anything, the real criticism is that it's easy to write
unmaintainable Perl, so there's too much of unmaintainable Perl around.

The other criticism is that Perl's learning curve is needlessly
prolonged because you need time to pick up all those idioms that are
possible - nice for those who're doing Perl and just Perl, horror for
those who usually work in other languages.

I don't know of any other serious design flaws in the language, given
its design goals. (When designing a scripting/glue language today, I'd
set up slightly different design goals, of course. Perl is far from the
optimum that should be used today, its main merits are its ubiquity and
completeness, not the language qualities.)

Regards,
Jo
 
T

Thomas F. Burdick

I think it's just obvious that this is the case. What would *stop*
you writing maintainable Perl?

The constantly shifting target of a language. Hell, even the parser
has changed over time. Fortunately this seems to have been solved by
Perl 6 [*].

[*] Stopping work on Perl 5 to focus on the probably never-to-be Perl
6 brought a surprising stability to the language.
 
P

Peter J. Holzer

["Followup-To:" header set to comp.lang.perl.misc.]
The constantly shifting target of a language. Hell, even the parser
has changed over time.

As with any other language I know, too (well, maybe cobol hasn't changed
in the last 10 years - I haven't looked lately).

The grammar of perl hasn't changed much since perl 5.0, which was
released in 1994. There were a few minor additions, but just about every
perl 5.0 script would still run with perl 5.8.x.

Try getting to run 13 year old C++ code with a current compiler some
time ...

Fortunately this seems to have been solved by
Perl 6 [*].

[*] Stopping work on Perl 5 to focus on the probably never-to-be Perl
6 brought a surprising stability to the language.

Perl 6 started in 2000, AFAIR, when 5.005_03 was the stable release of
perl5 (with development on perl 5.6 well on the way, yes).
Maybe my memory is faulty but I don't have the impression that there was
much more change in the six years between 5.0 and and 5.005_03 than in the
seven years between 5.005 and 5.8.8 (despite everybody complaining that
perl (not Perl) is essentially unmaintable).

hp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top