home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3767 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  3.1 KB

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