Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!news.sprintlink.net!dish.news.pipex.net!pipex!warwick!yama.mcc.ac.uk!liv!news
From: bruce@liverpool.ac.uk
Subject: Re: Extension/Scripting language comparisons
In-Reply-To: alan@lcs.mit.edu's message of 7 Jul 95 02:36:01
Message-ID: <BRUCE.95Jul7163829@iasc3.scm.liv.ac.uk>
Sender: news@liverpool.ac.uk (News System)
Nntp-Posting-Host: iasc3.scm.liv.ac.uk
Organization: IASC, University of Liverpool
References: <3thlus$isi@hpbab.wv> <ALAN.95Jul7023601@parsley.lcs.mit.edu>
Date: Fri, 7 Jul 1995 15:38:29 GMT
Lines: 54

>>>>> "Alan" == Alan Bawden <alan@lcs.mit.edu> writes:

> In article <3thlus$isi@hpbab.wv> joemu@aardvark.mentorg.com (Joe
> Mueller) writes:

>>    I'm in the workgroup within the CAD Framework Inititiative (a
>> standards organization for CAD tool developers/users) that is
>> responsible for Extension Language selection.  Some time ago we
>> selected Scheme as the standard extension language for this
>> organization but have lately come under fire for not
>> selecting/considering Tcl and Perl as alternatives to "ugly"
>> Scheme. I would like to get a list of pros/cons for Scheme, Tcl,
>> and Perl as extension/scripting languages to (hopefully) better
>> defend the choice of Scheme....

> Semantics.  Tcl and Perl are based on string substitution.  What
> could be simpler?  Scheme has closures and continuations.  Even
> graduate students at MIT are confused by that stuff.

Scheme is based on list evaluation: it has a very simple semantics,
uncluttered by restrictions.  String substitution can be surprisingly
subtle: look at the Tcl FAQ for some simple mistakes that just about
every Tcl user makes every now and again.

> Data structures.  Tcl and Perl have strings.  And basically, that's
> -all- they have.

That's unfair: Perl has lots more than just strings.  And Tcl
(explicitly borrowing from Lisp) has good support for lists.  For a
CAD extension language, I'd want something that can support numbers,
and can support them efficiently.  Tcl has major problems in that
area, with conversions happening all over the place slowing things
down.  Often this isn't significant (I'm using Tcl at the moment, and
its speed is just fine) but sometimes it is, and my guess is that for
a CAD extension language that's going to be used for significant
extensions, it would be.

> Scheme doesn't even have a foreign function interface, so you can't
> glue a Scheme program together with -anything-.

Choose an implementation.  For example, Guile.  Gosh, it's got two
foreign function interfaces, one compatible with Tcl's.

> Syntax.  We all learned infix syntax in grade school.  `x + 2*y' is
> concise, familiar and easy-to-read.  In Scheme you have to write `(+
> x (* 2 y))'.  Only an idiot would prefer to write that.

Or rather [expr $x+2*$y].  But yes, it's still better.  But Guile has
(or will have RSN) a C-like syntax, translated automatically to Scheme.
-- 
Bruce                   Institute of Advanced Scientific Computation
bruce@liverpool.ac.uk   University of Liverpool
http://supr.scm.liv.ac.uk/~bruce/

