Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > The Problem with Perl

Reply
Thread Tools

The Problem with Perl

 
 
William Goedicke
Guest
Posts: n/a
 
      02-09-2005
Dear Y'all -

As a preferatory note let me say that I've been writing perl for a
decade or so now and, I love perl. It allows me to concentrate my
sporadic programming efforts on a single tool because of its breadth
of functionality.

I've got some friends whose programming activity is not at all like
the sporadic hacks that I engage in. They're extremely expert
programmers with advanced programming degrees from MIT who are
developing things like tank simulations for the DoD in lisp and other
more arcane languages. With the one caveat that it may be OK for a
piker like me who doesn't need to code anything major, they speak of
perl with utter contempt.

The point of this message is that I'd like to open a discussion that
identifies exactly what it is about Perl as a language that offends
the literati of programming and, respecting that there may be some
valid points there, how we can code to avoid the problems these issues
may lead to.

My best understanding of what they think the problem is that Perl is
"context sensitive". That is it behaves differently when data
changes, if lists slip in where scalars were intended the results may
be wildly different than expected. This wouldn't be true in strongly
typed languages like C or lisp.

Do others have knowledge of such (and possibly other) criticisms and,
what do you think we should do to avoid the associated pitfalls.

- Billy

================================================== ==========
William Goedicke
Cell 617-510-7244 http://www.goedsole.com:8080
================================================== ==========

Lest we forget:

"ff0000" (html for bright red) turns out to be as good
an indicator of spam as any pornographic term.

- Paul Graham
 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      02-09-2005
William Goedicke <> wrote in
news::

> As a preferatory note let me say that I've been writing perl for a
> decade or so now and, I love perl. It allows me to concentrate my
> sporadic programming efforts on a single tool because of its breadth
> of functionality.


Good for you.

> The point of this message is that I'd like to open a discussion that
> identifies exactly what it is about Perl as a language that offends
> the literati of programming


Oh, please no.

perldoc -q compare

Sinan
 
Reply With Quote
 
 
 
 
D. Marxsen
Guest
Posts: n/a
 
      02-09-2005
"William Goedicke" <> schrieb im Newsbeitrag
news:...
....
> Do others have knowledge of such (and possibly other) criticisms and,
> what do you think we should do to avoid the associated pitfalls.


To me a programming project leader said, perl were "write only language".

I don't take that comment too serious, as ...

.... he is a Python fan ...

.... Perl allows a lot of shortcuts which make it almost unreadable - but you
can omit these and write wonderful speaking code.
Speaking of me, my code looks a bit like Pascal - I don't use these fancy
$_, $. etc. pp. but use the English module any time.
Then, Perl is as readable as many other languages.


Just my two cents ...

Detlef


PS:
This topic may offend those who expect pure programming talk in this NG ...
but it may also be interesting to learn new arguments for defending Perl
against criticisms.

--
D. Marxsen, TD&DS GmbH
(replace z with h, spam protection)


 
Reply With Quote
 
William Goedicke
Guest
Posts: n/a
 
      02-09-2005
Dear Sinan -

>>>>> "Sinan" == A Sinan Unur <> writes:


Sinan> William Goedicke <> wrote in
Sinan> news::

>> what it is about Perl as a language that offends the literati
>> of programming


Sinan> Oh, please no.

Sinan> perldoc -q compare

I was hoping for considerably more depth than the perldoc answer,
semantic theory sort of stuff.

- Billy

================================================== ==========
William Goedicke
Cell 617-510-7244 http://www.goedsole.com:8080
================================================== ==========

Lest we forget:

Happy isn't something you are; it's something you do.

- William Goedicke

 
Reply With Quote
 
Ian Wilson
Guest
Posts: n/a
 
      02-09-2005
William Goedicke wrote:
> Dear Y'all -
>
> As a preferatory note let me say that I've been writing perl for a
> decade or so now and, I love perl. It allows me to concentrate my
> sporadic programming efforts on a single tool because of its breadth
> of functionality.
>
> I've got some friends whose programming activity is not at all like
> the sporadic hacks that I engage in. They're extremely expert
> programmers with advanced programming degrees from MIT who are
> developing things like tank simulations for the DoD in lisp and other
> more arcane languages. With the one caveat that it may be OK for a
> piker like me who doesn't need to code anything major, they speak of
> perl with utter contempt.


Then I suspect they are unlikely to ever change their minds, no matter what.

> The point of this message is that I'd like to open a discussion that
> identifies exactly what it is about Perl as a language that offends
> the literati of programming


False premise, if at least one person qualifies as literati of
programming and is not offended by Perl. Could it be that your friends'
views are not unanimous amongst the "literati?"

I may be wrong, but "literati" means well-read. Have your friends a good
understanding of Wall's goals and design decisions for Perl? If asked,
can they articulate the criteria Wall and others described for their
design of Perl 5?

> and, respecting that there may be some
> valid points there, how we can code to avoid the problems these issues
> may lead to.
>


I feel more relevant questions might be: Who? Should they?

> My best understanding of what they think the problem is that Perl is
> "context sensitive". That is it behaves differently when data
> changes, if lists slip in where scalars were intended the results may
> be wildly different than expected. This wouldn't be true in strongly
> typed languages like C or lisp.


I'm no C programmer but I though bad things (tm) could happen if you
passed a scalar to a function expecting a pointer to an array?

I guess, since I am ignorant of it, that Lisp treats everything as
lists, including zero and single-length lists. I wonder how Lisp behaves
"if x slips in where y were intended" for all x and y. E.g. strings,
integers; references, pointers; constants, functions.

>
> Do others have knowledge of such (and possibly other) criticisms and,
> what do you think we should do to avoid the associated pitfalls.
>


Little, therefore nothing.

 
Reply With Quote
 
William Goedicke
Guest
Posts: n/a
 
      02-09-2005
Dear Detlef et al -

>>>>> "Detlef" == D Marxsen <> writes:


Detlef> ... Perl allows a lot of shortcuts which make it almost
Detlef> unreadable

Perl is indeed heavily idiomatic but, if that's only a concern from a
readibility standpoint then I don't see how any other languages would
be exempt from the same criticism: python's indentation, lisp's
parentheses, C's preprocessor constructions. All are hindrances to
readibility for those who aren't familiar with the language.

One could argue that idioms are also problematic if they have
side-effects which aren't clearly expressed in the syntax. Perl makes
particularly heavy use of this and there are innumerable examples of
pieces of code which do more than you would reasonably expect and, which
wouldn't be recognized except by those who've (carefully) read the right
chapter in the right O'Reily book. (Having said that I've certainly
dismissed those who haven't as beneath interest on many occasions

Detlef> PS: This topic may offend those who expect pure
Detlef> programming talk in this NG ...

Hopefully members of the group will respect discussions like this as
"programming talk". It's not *all* about fixing bad hash reference
syntax.

- Billy

================================================== ==========
William Goedicke
Cell 617-510-7244 http://www.goedsole.com:8080
================================================== ==========

Lest we forget:

"ff0000" (html for bright red) turns out to be as good
an indicator of spam as any pornographic term.

- Paul Graham
 
Reply With Quote
 
Arndt Jonasson
Guest
Posts: n/a
 
      02-09-2005

Ian Wilson <> writes:
> William Goedicke wrote:
> > My best understanding of what they think the problem is that Perl is
> > "context sensitive". That is it behaves differently when data
> > changes, if lists slip in where scalars were intended the results may
> > be wildly different than expected. This wouldn't be true in strongly
> > typed languages like C or lisp.

>
> I'm no C programmer but I though bad things (tm) could happen if you
> passed a scalar to a function expecting a pointer to an array?


Yes. If you use correct prototypes when compiling, and ask for warnings,
the compiler will warn. At runtime, you will probably get a core dump.

> I guess, since I am ignorant of it, that Lisp treats everything as
> lists, including zero and single-length lists. I wonder how Lisp
> behaves "if x slips in where y were intended" for all x and
> y. E.g. strings, integers; references, pointers; constants, functions.


Not everything is a list in Lisp. There are at least atoms (symbols)
too, and usually numbers separate from atoms.
Variables have no opinion at all about the kind of value that will be
put into them, but a value has a definite type. What the built-in functions
do with the different kinds of values depend on how sensible it is to
return a value. Taking the length of a number usually gives an error.
Some Lisp compilers can generate better code if told that a certain variable
will only hold values of a certain type.
 
Reply With Quote
 
Charlton Wilbur
Guest
Posts: n/a
 
      02-09-2005
>>>>> "WG" == William Goedicke <> writes:

WG> I've got some friends whose programming activity is not at all
WG> like the sporadic hacks that I engage in. They're extremely
WG> expert programmers with advanced programming degrees from MIT
WG> who are developing things like tank simulations for the DoD in
WG> lisp and other more arcane languages. With the one caveat
WG> that it may be OK for a piker like me who doesn't need to code
WG> anything major, they speak of perl with utter contempt.

Being an expert does not prevent people from holding poorly-informed
opinions. In fact, being an expert seems to be conducive to holding
poorly-informed opinions, because an expert can spend a considerable
amount of time learning about a narrow field and have only the vaguest
impression of what's going on outside that field.

WG> Do others have knowledge of such (and possibly other)
WG> criticisms and, what do you think we should do to avoid the
WG> associated pitfalls.

Stop worrying about what other people think. If Perl works well for
what you need done, use it. If it doesn't, use something else.

Charlton



--
cwilbur at chromatico dot net
cwilbur at mac dot com
 
Reply With Quote
 
ioneabu@yahoo.com
Guest
Posts: n/a
 
      02-09-2005

William Goedicke wrote:

> My best understanding of what they think the problem is that Perl is
> "context sensitive". That is it behaves differently when data
> changes, if lists slip in where scalars were intended the results may
> be wildly different than expected. This wouldn't be true in strongly
> typed languages like C or lisp.
>


Regarding C and C++, two words: memory leaks.

I am certain that a strict protocol could be developed within a Perl
project to ensure the same degree of rigor found in projects done in
any language.

I think Perl 6 may resemble Java in a few ways.

wana

 
Reply With Quote
 
William Goedicke
Guest
Posts: n/a
 
      02-09-2005
Dear Charlton -

>>>>> "Charlton" == Charlton Wilbur <> writes:


Charlton> Stop worrying about what other people think.

You misunderstood. I'm not worrying; I'm learning.

- Billy

================================================== ==========
William Goedicke
Cell 617-510-7244 http://www.goedsole.com:8080
================================================== ==========

Lest we forget:

The devil's in the details
 
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
FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? PerlFAQ Server Perl Misc 0 04-04-2011 10:00 PM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 02-27-2011 11:00 PM
FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? PerlFAQ Server Perl Misc 0 02-03-2011 11:00 AM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 01-23-2011 05:00 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57