home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.shell:3740 comp.unix.questions:10616
- Path: sparky!uunet!olivea!decwrl!sdd.hp.com!caen!sol.ctr.columbia.edu!eff!news.oc.com!convex!tchrist
- From: tchrist@convex.COM (Tom Christiansen)
- Newsgroups: comp.unix.shell,comp.unix.questions
- Subject: Re: Shell Scripts vs. C programs
- Keywords: shell script, C
- Message-ID: <1992Sep1.193533.26251@news.eng.convex.com>
- Date: 1 Sep 92 19:35:33 GMT
- References: <1992Sep1.044434.7193@news.acns.nwu.edu> <121@steiny.com> <1992Sep1.173604.15563@u.washington.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: 46
- 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 donn@carson.u.washington.edu (Donn Cave):
- :I have wondered if it would be possible to develop a reasonably usable shell
- :language that would have "software engineering" features for writing large
- :systems. For me, that would mean some level of typing, structured types,
- :functional scoping, and some way to deal with code in separate modules,
- :but I'm sure there's more to it if one were to consult some standard texts
- :on this issue. Would be nice to be able to create somewhat complex data
- :types, e.g., trees, and store "pointers" to functions, but not necessarily
- :the way C does it, maybe more like Lisp. It would of course need to be
- :able to run fairly efficient code. Seriously, it would also want to have
- :a little style, rather than being a grab-bag amalgam of every known
- :programming language, which can impair readability. (Tom, I'm not hostile
- :to perl, so don't be bashful about saying perl has all of these things and
- :more, but jeez it looks messy.) My rather simplistic attitude is that good
- :code can be fiddled with in one place, without unanticipatable side effects
- :in other places.
- :
- :If there's any advantage to such a thing, over C, it would be the sort of
- :padded environment that allows programs to be written fairly quickly without
- :worrying about dereferencing null pointers and things like that. Ideally,
- :it would also be possible to convert straight to C without much re-design,
- :so it could be used for prototyping.
-
- Who me, bashful? :-) Your criteria do describe perl rather well.
-
- Of the things you mention, perl is not big on types, structured or
- otherwise. You can do it, but it's not much fun. I believe this will
- be ameliorated in perl5. Of the things you mentioned, what perl does
- do well is:
-
- shell-style language w/ software engineering features for writing
- large programs, as follows...
- functional scoping (i think -- what does functional mean here?)
- code in separate modules (protected namespaces, module init code)
- pointers to functions
- fairly efficient code
- quick protoyping
- no worries on null pointers
-
- --tom
-
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
- "Unix is simple, but it takes a genius to understand the simplicity."
- --Dennis Ritchie
-