HP3000-L Archives

November 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Woods <[log in to unmask]>
Reply To:
Jeff Woods <[log in to unmask]>
Date:
Wed, 21 Nov 2001 10:08:53 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (96 lines)
On 2001-11-19, Richard Gambrell wrote:
>Thinking about languages for (re)writing DB applications....
>
>Perl ... "write once, read never" ....

>Java .... takes object thinking ....

>Cobol .... trying to avoid vendor lock in.

>C let's you hang your self....

>... Borland's Kylix and other ... vendor lock in.

>... RAD tools ... vendor lock in.

>PHP and Python ... web ... only ... ?

TCL (usually pronouced "tickle") is an interpreted language (like Perl)
that is open-source, cross-platform (including Windows, the Macintosh and
the various flavors of UNIX), extensible, logical, readable, writable,
modular, and procedural.  Tk is a GUI extension bundled with it.  (In fact,
it's often referred to as "TCL/Tk".)  TCL reminds me of a cross between
COBOL, Pascal and MPE JCL.  It's been around for several years and has a
smaller "user base" than Perl, Java and some other languages, but it's not
going to disappear from the planet anytime soon.  It also has features
designed specifically for web-page and other networking applications,
associative arrays, structured lists, scope rules, "packages" (which
explicitly define public and private components of a library module),
regular expressions and (where it makes sense) patterns, cross-platform
support (for example, code to handle UNIX, Microsoft and Apple text file
record separators), programmer-defined namespaces, and commands to handle
event-handling and sockets.

TCL was originally conceived as a flexible, embeddable scripting language
so that diverse applications wouldn't each have to implement their own
limited and unique scripting to provide automation hooks (code reuse) with
the added bonus that knowing TCL from one application would allow reuse of
knowledge in scripting other applications.  These days, however, it's used
as a stand-alone interpreter as much or more than as an embedded one.

One of the things that takes some getting used to for programmers used to
writing in a more traditional compiled language is that the TCL interpreter
consists of a *very* simple parser and a list of installed commands.  The
parser *only* converts each command (as execution comes to it) into a list
of tokens and then looks up the first token in the list of known
commands.  That command is then invoked with the rest of the tokens on the
line as parameters.  The trick is that the parser gets no help at all from
any knowledge of the command being parsed... so the parser is very
consistent.  (Sometimes that consistent lack of insight into what the
command will really be doing surprises a programmer who's used to parsers
which know about data types and such things.  But in general I think it's
an advantage to TCL because there are no exceptions to how things get
parsed.  IOW, it's simpler... which I think is the point.  :)

A couple of good books on the subject:

Excellent tutorial, very good reference, fairly current:
"Practical Programming In TCL and Tk" by Brent Welch
http://www.amazon.com/exec/obidos/ASIN/0130220280

An excellent introduction/tutorial, but somewhat dated:
"Tcl and the Tk Toolkit" by John K. Ousterhout
http://www.amazon.com/exec/obidos/ASIN/020163337X
(Ousterhout is the original creator of TCL/Tk.)

A search of http://www.sourceforge.net for "TCL", "TCL Tk" and "Expect" (a
frequently used TCL extension) yields a fair number of interesting hits
including:

Tcl -- http://sourceforge.net/projects/tcl/
Tool Command Language (Tcl) is an interpreted language and a very portable
interpreter for that language. Tcl is embeddable and extensible, and has
been widely used since its creation in 1988 by John Ousterhout. Check out
the SourceForge Tcl Foundry

Tk Toolkit -- http://sourceforge.net/projects/tktoolkit/
Tk is a GUI toolkit for Tcl. It is also shared by TkPerl and Python's
TkInter. This project is part of the Tcl Foundry.

TclPro -- http://sourceforge.net/projects/tclpro/
The TclPro tool set includes a graphical debugger, a static code checker, a
wrapper to generate stand-alone executables, a "compiler" that writes out
Tcl byte codes, and a loader that reads byte codes.

Expect -- http://sourceforge.net/projects/expect/
Expect is a tool for automating interactive applications such as telnet,
ftp, passwd, fsck, rlogin, tip, etc. Expect is also useful for testing
these same applications.

-- Jeff Woods
[log in to unmask] (portable & permanent)
[log in to unmask] (deprecated & soon to be obsolete)

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2