comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: scripting/extension language for Ada (was : Re: tagged types extensions)
Date: 2000/02/05
Date: 2000-02-05T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0002052058560.1259-100000@shell5.ba.best.com> (raw)
In-Reply-To: 87gvdl$qsp$1@nnrp1.deja.com

On Sat, 5 Feb 2000 blaak@infomatch.com wrote:
> Robert A Duff <bobduff@world.std.com> wrote:
> > Ray Blaak <blaak@infomatch.com> writes:
> > > Scripting languages, on the other hand, tend to be used for
> > > small, quickly written programs, and good ones tend to have a
> > > succinct powerful notation.
> >
> > I've seen way too much long-lived software written in Perl,
> > csh, awk, make, etc.

Me too.

> There is always room for a better language. Is Ada right for a
> scripting language, though?

IMO, no. That's why I suggested embedding a language in Ada, with that 
languages implementation being startlingly clear Ada code.

> > Anyway, "quickly written" is irrelevant.  The only time it can
> > possibly make sense to use languages that are difficult to
> > maintain is when you're going to quickly throw away the code
> > after writing it.

I've never observed the phenomena described, IME code is never quickly
thrown away.

> Nobody (at least not me) is advocating the use of scripting
> languages that are difficult to maintain.
> 
> The usefulness of a good scripting language is that it is well
> designed for invoking OS services (expressing the piping of a
> chain of processes, for example), interactive and easy to debug,
> and tends to have small programs.  E.g. a few K at most for a
> reasonably complex script -- that's it! No build steps, object
> files, link times. Just run it.

All languages are pushed outside their original design limitations, so 
a scripting language had better be capable of growing beyond "a few KLOC".

> One tends to use scripting languages to implement small little
> tasks (munge a few files, spit out some email, walk a few
> websites,...)
> 
> Scripting languages should encourage programs that are easy to
> write, easy to understand, and easy to change.
> 
> Most scripting languages are atrocious (esp. sh and
> friends). They don't have to be.
> 
> What I like about scsh is that one has a real programming
> language (Scheme) focused on tasks such that the limitations of
> Scheme don't apply (i.e. the lack of a module or package system
> for programming "in the large").

Scsh uses Scheme48, which has a fascinating and powerful module system
IMO.

> Now Ada is a fine language, and my language of choice for real
> software systems. The problem with Ada for scripting purposes,
> however, is that there is too much declarative infrastructure
> needed to do simple tasks. 

OK so far...

> Ada's strong static typing requires ones abstractions to be carefully
> specified. 

Wrong. *Explicit* static typing, *explicit* instantiation, and a
heavyweight (some say more readable :-) syntax are what make Ada painful 
as a scripting language. See ML, Haskell, or the DrScheme environment for 
counterexamples. 

> Dynamic typing in a scripting language, on the other hand, allows one
> to just "whip off" a solution, and yet still have strong type checking
> for good runtime error detection.

There are good arguments for dynamic typing, but this isn't one of them.

> Consider this scsh snippet:
> 
>   ;; Mail myself files matching some criteria
>   (with-cwd "~/myfiles"
>     (for-each (lambda (file)
>                 (if (run (grep "some pattern" ,file))
>                     (run (mail -s "found it" blaak@home) (< ,file))))
>               (directory-files)))

ML or Haskell would require a few more lines to make the types right, like 
checking that the result of your grep isn' a null string.

-- Brian





  reply	other threads:[~2000-02-05  0:00 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-27  0:00 tagged types extensions - language design question Vladimir Olensky
2000-01-27  0:00 ` Fraser
2000-01-27  0:00 ` Matthew Heaney
2000-01-27  0:00   ` Charles Hixson
2000-01-28  0:00   ` Vladimir Olensky
2000-01-28  0:00     ` Matthew Heaney
2000-01-28  0:00       ` Charles Hixson
2000-01-28  0:00         ` Matthew Heaney
2000-02-01  0:00           ` Charles Hixson
2000-02-01  0:00             ` Matthew Heaney
2000-01-29  0:00       ` Vladimir Olensky
2000-01-29  0:00         ` Matthew Heaney
2000-01-29  0:00         ` Matthew Heaney
2000-01-31  0:00           ` Vladimir Olensky
2000-01-31  0:00             ` Matthew Heaney
2000-01-31  0:00               ` Vladimir Olensky
2000-01-27  0:00 ` Laurent Guerby
2000-01-28  0:00   ` Vladimir Olensky
2000-01-28  0:00     ` Andy
2000-01-28  0:00       ` Vladimir Olensky
2000-01-29  0:00         ` Andy
2000-01-31  0:00           ` Vladimir Olensky
2000-01-28  0:00 ` Tucker Taft
2000-01-31  0:00   ` Vladimir Olensky
2000-02-01  0:00   ` Charles Hixson
2000-02-01  0:00     ` Matthew Heaney
2000-02-01  0:00       ` Brian Rogoff
2000-02-03  0:00         ` scripting/extension language for Ada (was : Re: tagged types extensions) root
2000-02-03  0:00           ` Brian Rogoff
2000-02-04  0:00             ` Ray Blaak
2000-02-04  0:00               ` Robert A Duff
2000-02-05  0:00                 ` blaak
2000-02-05  0:00                   ` Brian Rogoff [this message]
2000-02-09  0:00                   ` Robert A Duff
2000-02-09  0:00                     ` Ted Dennison
2000-02-10  0:00                       ` Samuel T. Harris
2000-02-05  0:00                 ` Ehud Lamm
2000-02-10  0:00                 ` Pascal Martin
2000-02-10  0:00                   ` Ray Blaak
2000-02-11  0:00                     ` David Starner
2000-02-12  0:00                       ` blaak
2000-02-15  0:00                         ` Brian Rogoff
2000-02-12  0:00                       ` Pascal Martin
2000-02-11  0:00                     ` scripting/extension language for Ada (we have an opportunity here) Tarjei T. Jensen
2000-02-11  0:00                       ` Robert I. Eachus
2000-02-12  0:00                         ` Pascal Martin
2000-02-13  0:00                           ` Robert I. Eachus
2000-02-16  0:00                             ` scripting/extension ... [off topic] Nick Roberts
2000-02-16  0:00                               ` Ray Blaak
2000-02-12  0:00                         ` scripting/extension language for Ada (we have an opportunity here) Tarjei Tj�stheim Jensen
2000-02-12  0:00                           ` Samuel T. Harris
2000-02-14  0:00                             ` Robert A Duff
2000-02-15  0:00                               ` Samuel T. Harris
2000-02-16  0:00                                 ` Robert A Duff
2000-02-16  0:00                                   ` Samuel T. Harris
2000-02-16  0:00                                     ` Robert A Duff
2000-02-17  0:00                                       ` Samuel T. Harris
2000-02-12  0:00                           ` root
2000-02-12  0:00                         ` blaak
2000-02-12  0:00                         ` Samuel T. Harris
2000-02-14  0:00                     ` scripting/extension language for Ada (was : Re: tagged types extensions) Robert A Duff
2000-02-04  0:00               ` Stanley R. Allen
2000-02-04  0:00                 ` Samuel T. Harris
2000-02-05  0:00                   ` Lionel Draghi
2000-02-05  0:00                     ` Samuel T. Harris
2000-02-06  0:00                       ` Bryce Bardin
2000-02-08  0:00                         ` Samuel T. Harris
2000-02-06  0:00                       ` Lionel Draghi
2000-02-05  0:00                 ` Lionel Draghi
2000-02-05  0:00                 ` Ray Blaak
2000-02-05  0:00             ` scripting/extension language for Ada (was : Re: tagged typesextensions) Lionel Draghi
2000-02-05  0:00           ` scripting/extension language for Ada (was : Re: tagged types extensions) Ehud Lamm
2000-02-06  0:00             ` Lionel Draghi
2000-02-06  0:00               ` scripting/extension language for Ada Terry Westley
2000-02-06  0:00               ` scripting/extension language for Ada (was : Re: tagged types extensions) Ehud Lamm
2000-02-09  0:00               ` Robert A Duff
2000-01-31  0:00 ` tagged types extensions - language design question Mark Lundquist
2000-02-01  0:00   ` Vladimir Olensky
2000-02-01  0:00   ` Simon Wright
2000-02-01  0:00   ` Ehud Lamm
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox