Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

Reply
Thread Tools

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

 
 
Joachim Durchholz
Guest
Posts: n/a
 
      06-11-2007
Twisted schrieb:
> 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
 
Reply With Quote
 
 
 
 
Twisted
Guest
Posts: n/a
 
      06-11-2007
On Jun 11, 2:42 am, Joachim Durchholz <(E-Mail Removed)> wrote:
> 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".)

 
Reply With Quote
 
 
 
 
Joachim Durchholz
Guest
Posts: n/a
 
      06-11-2007
Twisted schrieb:
> On Jun 11, 2:42 am, Joachim Durchholz <(E-Mail Removed)> wrote:
>> 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".)


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
 
Reply With Quote
 
Tim Bradshaw
Guest
Posts: n/a
 
      06-11-2007
On Jun 11, 8:02 am, Twisted <(E-Mail Removed)> wrote:
> On Jun 11, 2:42 am, Joachim Durchholz <(E-Mail Removed)> wrote:
>
> > 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).
>


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

 
Reply With Quote
 
Patricia Shanahan
Guest
Posts: n/a
 
      06-12-2007
Twisted wrote:
> On Jun 11, 2:42 am, Joachim Durchholz <(E-Mail Removed)> wrote:
>> 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".)
>


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
 
Reply With Quote
 
Daniel Barlow
Guest
Posts: n/a
 
      06-12-2007
Tim Bradshaw wrote:
> I think it's just obvious that this is the case. What would *stop*
> you writing maintainable Perl?


A grudge against humanity, usually


-dan
 
Reply With Quote
 
Twisted
Guest
Posts: n/a
 
      06-12-2007
On Jun 11, 5:36 pm, Tim Bradshaw <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
Twisted
Guest
Posts: n/a
 
      06-12-2007
On Jun 11, 8:57 pm, Patricia Shanahan <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
Joachim Durchholz
Guest
Posts: n/a
 
      06-12-2007
Twisted schrieb:
> On Jun 11, 5:36 pm, Tim Bradshaw <(E-Mail Removed)> wrote:
>> 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.


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
 
Reply With Quote
 
Thomas F. Burdick
Guest
Posts: n/a
 
      06-12-2007
On Jun 11, 11:36 pm, Tim Bradshaw <(E-Mail Removed)> wrote:
> On Jun 11, 8:02 am, Twisted <(E-Mail Removed)> wrote:
>
> > On Jun 11, 2:42 am, Joachim Durchholz <(E-Mail Removed)> wrote:

>
> > > 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).

>
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations Xah Lee Java 30 06-16-2007 05:57 PM
The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations Xah Lee Python 30 06-16-2007 05:57 PM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Perl Misc 21 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Python 23 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Java 22 03-21-2006 07:02 AM



Advertisments