Friday, August 6, 2010
Java and Tcl
JACL - A Tcl Implementation in Java
One on-going question in the Tcl community is, how can Tcl exploit the popularity of Java and the World
Wide Web. There are two projects that try to bring Tcl into the world of Java and WWW. The Tcl
Plugin  allows the execution of Tcl scripts inside Web browsers. However, the Tcl Plugin runs only
inside certain browsers (Navigator and Explorer), requires the user to install software on local machines
and does not communicate well with Java. Tcl-Java  allows the evaluation of Tcl code in Java applications, but it requires native methods andthus cannot run inside most browsers.
A Tcl implementation in Java will facilitate the creation of portable Tcl extensions . Tcl is a portable
scripting language. However, although Tcl provides some support for writing portable extensions, maintaining Tcl extensions written in C for multiple platforms is still a difficult task, especially if network or graphics programming is involved. Currently Tcl runs on more platforms than Java. However, due to the large number of commercial Java developers, Java will probably catch up in the near future and run on more platforms. If Tcl implementations can be written in Java, the Tcl community can leave the portability issues to JavaSoft and other Java implementers and concentrate on developing the Tcl core interpreter and extensions.
On the other hand, Java needs a scripting language as powerful as Tcl. Java is a structured programming
language and is not a good scripting or command language . Currently, scripting languages that can
Jacl is a comprehensive solution to the problem of Tcl and Java integration. Since the Jacl interpreter
and extensions are written completely in Java, they can run inside any JVM, making Tcl an embeddable,
universal scripting language for Java. By using the Jacl interpreter, Java programmers can use Tcl to control simple Web pages, complex networked Java applications, and anything in between.