Re: Scripting Languages

Dr James Coggins (
Tue, 17 Oct 1995 16:54:16 +0100

> J. Coggins' wrote regarding scripting languages that:
> > 1. On Scripting Languages
> >
> > I was thinking about scripting languages for my ARCTIC distributed
> > computing environment when it hit me: with an appropriate
> > communication library and a simple convention for defining the
> > capabilities of server modules, my scripting language can be C++!
> I just wanted to sound a warning that we found, to our dismay, that
> having a programming language such as C or C++ as a scripting language
> didn't work very well in practice.

A useful cautionary tale.

While I have nothing against specialized scripting languages, it seems
more parsimonious to define an appropriate C++ library and use the
same language for scripting as for development. Then scripts can be
invoked by other scripts in the same manner as servers. In fact, the
difference between scripts and servers is all convention and not
substance. (Whereas with a specialized scripting language scripts and
servers are different species that cannot mix.) This would seem to
enable the kind of open growth that is being seen now with World Wide
Web scripting languages. (Hot Java is a cleaned-up C++ that works with
the Web.)

As to the particular technical issue Will raises regarding strong typing,
I know a solution: inheritance in C++ is intended to allow a variable
to refer to an object that is actually any of a prescribed set of types
(the derived types). A judiciously designed inheritance hierarchy for
common data types would answer this objection and also permit growth of
new types. While I don't like Smalltalk-like monolithic inheritance
hierarchies in general, something like that might be just what is needed
for supporting a flexible scripting facility still based in C++.

Dr. James M. Coggins
Associate Professor & Associate Chairman for Academic Affairs
Department of Computer Science  E:
University of North Carolina	V: 919-962-1738    F: 919-962-1799
Chapel Hill, NC 27599-3175	W: