Perl (or Unix vs. MS, actually)
Derek D. Martin
ddm+gnhlug at pizzashack.org
Tue Aug 20 15:01:45 EDT 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At some point hitherto, pll at lanminds.com 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... 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. I'm
inclined to think you're being intentionally obtuse.
You are also aware that my first Perl program was a > 1000 line
program for managing host resolution, which worked well enough for us
to use it in production at MCL, with or without the web-based
interface. So you know I'm not trying to damn perl to unusability;
I'm only saying that as languages go, I can see why some people find
it reletively hard to learn, as compared to a lot of other languages.
Myself included.
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
- Perl does some things which are commonly done in programming
languages very, very differently from the rest
- Perl has a lot of obscure features and syntax, like the so-called
"magic" variables, that don't lend themselves to readable code
- 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
- 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
For these reasons, I and others find perl difficult. That is, more
often than not, I/we find that:
- learning to do certain common programming tasks in perl is
unneccessarily hard
- understanding some of perl's syntax is counterintuitive, and
unnecessarily hard
- reading and maintaining other people's code is unnecessarily hard
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.
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.
> >I will also point out that many of the "traditional" Unix command were
> >named when there was a four-letter limitation on filenames.
>
> I don't believe there was ever a name-length limitation on filenames.
Then you believe incorrectly. Many variants of Unix had a
14-character filename limit. There is still a limit today, though
it's ridiculously large, so as not to matter practically.
I may only be imagining this, but I could swear it was a predecessor
to Unix, from whence many of these commands originally came (possibly
multics? anyone?) that did have a four character filename limit.
OTOH, I haven't been getting much sleep lately... =8^)
- --
Derek Martin ddm at pizzashack.org
- ---------------------------------------------
I prefer mail encrypted with PGP/GPG!
GnuPG Key ID: 0x81CFE75D
Retrieve my public key at http://pgp.mit.edu
Learn more about it at http://www.gnupg.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9YpIZdjdlQoHP510RAobSAKCbPcNGlC5f+GWjZtbYzp+FV7mxBACfZa8O
4TDjJ8v8KW34ywa7RO8Ogjs=
=Ksgm
-----END PGP SIGNATURE-----
More information about the gnhlug-discuss
mailing list