Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Cash 0.20
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bruno.Verlyck@i...
Subject: Re: [Caml-list] Cash 0.20
   Date: Wed, 28 Aug 2002 15:26:41 +0200
   From: Stefano Zacchiroli <zack@cs.unibo.it>
   Mail-Followup-To: Inria Ocaml Mailing List <caml-list@inria.fr>

   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