JPL
Jacl, Tcl Blend
JPython
Scripting has clear advantages for rapid prototyping. Disadvantages of scripting concern the lack of efficiency, and the absence of compile-time checks.
Script languages may be extended using C/C++,
and more recently Java.
The impact of Java becomes evident when considering
that there exists a Java implementation for almost
each scripting language, including Tcl/Tk, Perl and Python.
JPython, which is the realization of Python in Java,
even offers the possibility to integrate Python classes with Java
classes, and is announced as a candidate
scripting platform for Java in
Java has also in other respects stimulated programming language
research,
since it appears to be an ideal platform
for realising higher level programming languages.
Objects in Javascript
Javascript is a somewhat special case, since it allows for
the use of built-in objects,
in particular the objects defined by the
Document Object Model (DOM),
and its precursors.
Nevertheless, due to its dynamic nature, Javascript also allows
for creating user-defined objects,
as indicated in the example
below.
function object_display(msg) { object method
return msg + ' (' + this.variable++ + ')';
}
function object() { object constructor
this.variable=0;
this.display = object_display;
return this;
}
var a = new object(); create object
document.write(a.display("a message"));
document.write(a.display("another message"));
</script>
Which objects are available as built-in objects depends on the environment in which Javascript programs are executed. In the example, there is an invocation of the write method for a document object. The document object, as well as other objects corresponding to the browser environment and the contents of the page loaded, are part of the Document Object Model, which is discussed in more detail in section DOM.
As an aside, Javascript has become surprisingly popular for writing dynamic HTML pages, as well as for writing server-side scripts. It is also supported by many VRML (Virtual Reality Modeling Language) browsers to define script nodes. See section DIVA. A reference implementation of Javascript is available, for embedding Javascript in C/C++ applications.