home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!convex!convex!tchrist
- From: tchrist@convex.COM (Tom Christiansen)
- Newsgroups: comp.unix.shell
- Subject: Re: Shell Scripts vs. C programs
- Message-ID: <1992Sep2.143154.15953@news.eng.convex.com>
- Date: 2 Sep 92 14:31:54 GMT
- References: <121@steiny.com> <1992Sep1.173604.15563@u.washington.edu> <FRIEDMAN.92Sep2045423@nutrimat.gnu.ai.mit.edu>
- Sender: usenet@news.eng.convex.com (news access account)
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- Organization: Convex Computer Corporation, Colorado Springs, CO
- Lines: 58
- Originator: tchrist@pixel.convex.com
- Nntp-Posting-Host: pixel.convex.com
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
-
- From the keyboard of friedman@gnu.ai.mit.edu (Noah Friedman):
- :The reason why people complain about perl
- :having the kitchen sink is that it has no uniform design; instead there is
- :a grab bag of features that look hastily adopted from other programs like
- :sed, awk, and grep, none of which are very orthogonal.
-
- Orthogonality was not a design goal. :-) No, really -- but one design
- goal *was* an easy migration path for the Unix world. That means having
- what you're used to in C, sh, awk, sed, and several other things as
- you're use to them. The idea was that if you already knew how to
- do something in tr or sed or whatnot, you should be able to leverage
- this knowledge without having to learn a new syntax entirely.
-
- :There are various
- :annoying context-dependent misfeatures in perl as well, and
- :multi-dimensional/nested arrays are cumbersome (the associate array
- :features in awk are much easier to deal with).
-
- You're certainly right about nested arrays being cumbersome. In fact,
- this and not the lack of minimalism is far and above my biggest
- complaint. I have several schemes for achieving nested, recursive,
- or record-like data structures, but all are synthesized. This may be
- fixed in the next release. :-)
-
- But perl's associative arrays are really quite the same as awk's,
- and its multi-dimensional array *emulation* is also like awk's.
-
- :Perl also suffers from
- :being too redundant...
-
- You say "too" redundant. Is some redundancy ok? How much? Who
- draws the line? Even C has redundancy in having three forms of
- looping, the comma getting used as a statement separator, etc.
-
- :The idea of function calls being lvalues I find
- :to be unaesthetic as well.
-
- It is a strange thing. But it's so you can get at single characters
- or single bits in a long string. It's only in these two accessor
- pseudofunctions:
-
- substr($var, $pos, 3) = 'red';
- vec($var, $bitindex, 1) = 1;
-
- : Incidentally, I have a public domain Scheme implementation written in
- :Perl. It's missing continuations among other things, but it's still rather
- :interesting... Anyone have any idea who wrote it? There wasn't any author
- :listed in the copy I found.
-
- Try Felix Lee <flee@guardian.cs.psu.edu>
-
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
- It is the business of little minds to shrink.
- -- Carl Sandburg
-