From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA20935; Wed, 28 Aug 2002 16:05:09 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA20937 for ; Wed, 28 Aug 2002 16:05:08 +0200 (MET DST) Received: from waco.inria.fr (waco.inria.fr [128.93.25.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g7SE54510328; Wed, 28 Aug 2002 16:05:04 +0200 (MET DST) Received: (from verlyck@localhost) by waco.inria.fr (8.11.1/8.11.1) id g7SE54E30702; Wed, 28 Aug 2002 16:05:04 +0200 Date: Wed, 28 Aug 2002 16:05:04 +0200 Message-Id: <200208281405.g7SE54E30702@waco.inria.fr> X-Authentication-Warning: waco.inria.fr: verlyck set sender to Bruno.Verlyck@inria.fr using -f To: zack@cs.unibo.it CC: caml-list@inria.fr In-reply-to: <20020828132641.GD3270@cs.unibo.it> (zack@cs.unibo.it) Subject: Re: [Caml-list] Cash 0.20 From: Bruno.Verlyck@inria.fr References: <200208281301.g7SD1Wn19894@waco.inria.fr> <20020828132641.GD3270@cs.unibo.it> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Date: Wed, 28 Aug 2002 15:26:41 +0200 From: Stefano Zacchiroli Mail-Followup-To: Inria Ocaml Mailing List On Wed, Aug 28, 2002 at 03:01:32PM +0200, Bruno.Verlyck@inria.fr wrote: > API of Scsh (0.5.3), the Scheme Shell by Olin Shivers. It's designed for > writing standalone Unix programs and shell scripts (but rather *not* for > interactive command use). Do you have planned a future "interactive command use" release? No. One of Olin Shivers points in designing Scsh was that an interactive command language has to be terse to the point of being write-only. (See below an excerpt of http://www.scsh.net/docu/scsh-paper/scsh-paper-Z-H-4.html. Read the intro -- the `Prologue' --, too: it's delightful!) He chose to focus on the programming language side. As command languages, shells are very hard to beat. Of course, you can still type ledit cash followed by `open Cash;;' and get an interactive top-level where you can type OCaml expressions :-). Bruno. Unix shells, such as sh or csh, provide two things at once: an interactive command language and a programming language. Let us focus on the latter function: the writing of ``shell scripts'' -- interpreted programs that perform small tasks or assemble a collection of Unix tools into a single application. [..] There is a tension between the shell's dual role as interactive command language and shell-script programming language. A command language should be terse and convenient to type. It doesn't have to be comprehensible. Users don't have to maintain or understand a command they typed into a shell a month ago. A command language can be ``write-only,'' because commands are thrown away after they are used. However, it is important that most commands fit on one line, because most interaction is through tty drivers that don't let the user back up and edit a line after its terminating newline has been entered. This seems like a trivial point, but imagine how irritating it would be if typical shell commands required several lines of input. Terse notation is important for interactive tasks. Shell syntax is also carefully designed to allow it to be parsed on-line -- that is, to allow parsing and interpretation to be interleaved. This usually penalizes the syntax in other ways (for example, consider rc's clumsy if/then/else syntax [rc]). Programming languages, on the other hand, can be a little more verbose, in return for generality and readability. The programmer enters programs into a text editor, so the language can spread out a little more. The constraints of the shell's role as command language are one of the things that make it unpleasant as a programming language. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners