In a message dated: Tue, 20 Aug 2002 15:01:45 EDT
"Derek D. Martin" said:

>At some point hitherto, [EMAIL PROTECTED] hath spake thusly:
>> 
>> In a message dated: Tue, 20 Aug 2002 12:37:34 EDT
>> "Derek D. Martin" said:
>> 
>> >I never claimed Unix commands weren't obscure; they ARE.  I prefer
>> >them to Microsoft commands because in general I find they do more and
>> >work better.  However, Unix has man pages.
>> 
>> But man pages and documentation aren't going to help a shell script 
>> be more readable! (at least by your own argument).
>
>Which is specifically why I made that point immediately after what you
>quoted.  Now you're just trolling...

No, I'm using your own argument against you.  You state that UNIX has 
man pages as if that excuses the obscure command names of the OS.  
Yet when I stated that all of Perl's "magic" variables are clearly 
documented, your first reaction was that it doesn't make a perl 
program any more readable just because they're documented somewhere.

>And my argument all along was
>not that Perl has obscurities; it's that it has TOO MANY, and the
>people who write perl (in my experience) have a propensity to use them
>TOO OFTEN, being not conducive to actually learning perl.  

Yes, perl has a lot of obscurities.  However, I don't feel that it's 
an obstruction to learning the language.  I've been programming perl 
for about 8+ years now, and can't claim to know more than 4 or 5 of 
these off the top of my head.  You seem to be implying that to learn 
the language one must memorize all of the variables, which is 
ridiculous.  In common practice, most of these variables aren't used.

If you need to read someone elses code in order to maintain it, then 
look the variable up in the docs, and make a comment in the code.  
Enhancement *is* part of maintainence.

>I'm inclined to think you're being intentionally obtuse.

I'm inclined that you just feel like complaining about something :)

Hundreds of thousands of people have learned to program perl.  Many 
of them know no other language, so it can't be that difficult.
Of course, that may well be *why* their code is relatively 
unreadable, as they've never learned much in the way of proper coding 
style (whatever that can be defined as).

>I'll try to sum up the reasons for this succinctly, so we can put this
>to bed.  Preface with IMO, wherever you think it might be appropriate.
>
> - Perl "grew" rather than being designed.  Its syntax is a
>   mish-mash of features from several other languages and/or utilities
>   all glued together, and as such sometimes seems to be inconsistent
>   with itself

Okay, no debate there.

> - Perl does some things which are commonly done in programming
>   languages very, very differently from the rest

Like what?  Other than structures which don't need to exist in perl.

> - Perl has a lot of obscure features and syntax, like the so-called
>   "magic" variables, that don't lend themselves to readable code

I don't see how this is any different than any other language.  I've 
seen plenty of unreadable C.  I've even seen unreadable sh!

The use of obscure features and syntax is available in any language, 
and there for the programmer to abuse to their heart's content.  This 
is a people problem, not a language problem.

> - The people who write Perl by and large seem to prefer a style (if
>   you can call it that) that promotes neither code readability nor
>   education

This I'll grant you to some extent.  However, it's a people problem, 
not one with the language.

> - For all its wiz-bang features that make many tasks which are
>   difficult on other languages much easier in perl, it lacks the
>   ability to easily manipulate data structures; one of the most
>   common things done with computer programs.  Dealing with arrays of
>   hashes of hashes is somewhat clumsy, by comparison to other
>   languages

Agreed, and in most cases where you need to deal with arrays of 
hashes of hashes, or hashes of arrays of hashes, etc. you're probably 
better off using something like C.

Of course, if you've mucked about with this type of thing long 
enough, it becomes rather natural and understandable, and therefore, 
simpler to deal with than using C.

> - learning to do certain common programming tasks in perl is
>   unneccessarily hard

You keep mentioning this, yet you haven't mentioned what any of these 
"common programming tasks" are.  Can you provide examples?

> - understanding some of perl's syntax is counterintuitive, and
>   unnecessarily hard

Other than the magic variables, which for the most part, are 
irrelevant, what are some examples of perl syntax which you find 
counter-intuitive?  I ask not to be difficult, but because I've never 
encountered anything in the language I've considered 
counter-intuitive.  Essentially, all the syntax is based around 
performing an operation on a scalar or on lists of scalars and follow 
the basic syntax:

        commandname {block of code} list of scalars to operate on

> - reading and maintaining other people's code is unnecessarily hard

Well, yeah, but that's hardly specific to perl, nor is it a language 
problem, it's a problem with the moron who wrote unreadable/
unmaintainable code in the first place.

>The last one is a key point.  Maintaining someone else's code in any
>language is often difficult, especially if they don't comment their
>code and use a style that lends itself to readability.  But many of
>the features of Perl compound this problem, making for naturally ugly
>code.  When you sum these things all up, they keep me from reaching
>for Perl to do much of anything.  You don't have to agree.

Why does what someone else does prevent you from using it?
How often have you needed to maintain someone elses perl code?
Many people drive like maniacs, but it doesn't make me want to not 
own a car.

>I do occasionally use Perl, but I find that it's usually when I want
>to do a lot of regexp work, or shell-script-like work, but don't want
>to take the performance hit of using a shell script.  Otherwise, bash
>or C suit me better.

You need to use the right tool for the right job.  And often that 
tooll is the one you know the best.  Sometimes it is easier to drive 
the philips-head screw in with the 5lb. sledge :)

-- 

Seeya,
Paul
--
        It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

         If you're not having fun, you're not doing it right!


_______________________________________________
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss

Reply via email to