# -II- What is Tcl? Tk? Extended Tcl?

    From: FAQ General information

    o Highlights of Tcl based languages

    	Tcl and Tk originated with Dr. John Ousterhout (OH'-stir-howt)
    from the University of California, Berkeley, California.  A quip about
    the pronunciation of Dr. O's last name from <URL:news:comp.lang.tcl> pundit
    <URL:mailto:js@aelfric.bu.edu> Jay Sekora:

    > `It's pronounced Oh-stir-howt
    >     without a doubt!
    >  Not Oh-stir-hoot;
    >     he's not a brute.'

    	Tcl (current release version 7.3) stands for ``tool command
    language'' and is pronounced ``tickle.'' The author's home ftp site for
    the Tcl source code is <URL:ftp://ftp.smli.com/pub/tcl/.
    Tcl is actually two things: a language and a library.  First, Tcl is a
    simple textual language, intended primarily for issuing commands to
    interactive programs such as text editors, debuggers, illustrators, and
    shells.  It has a simple syntax and is also programmable, so Tcl users
    can write command procedures to provide more powerful commands than
    those in the built-in set.

    	Second, Tcl is a library package that can be embedded in
    application programs.  The Tcl library consists of a parser for the Tcl
    language, routines to implement the Tcl built-in commands, and
    procedures that allow each application to extend Tcl with additional
    commands specific to that application.  The application program
    generates Tcl commands and passes them to the Tcl parser for
    execution.  Commands may be generated by reading characters from an
    input source, or by associating command strings with elements of the
    application's user interface, such as menu entries, buttons, or
    keystrokes.  When the Tcl library receives commands it parses them into
    component fields and executes built-in commands directly.  For commands
    implemented by the application, Tcl calls back to the application to
    execute the commands.  In many cases commands will invoke recursive
    invocations of the Tcl interpreter by passing in additional strings to
    execute (procedures, looping commands, and conditional commands all
    work in this way).

    	An application program gains three advantages by using Tcl for
    its command language.  First, Tcl provides a standard syntax:  once
    users know Tcl, they will be able to issue commands easily to any
    Tcl-based application.  Second, Tcl provides programmability.  All a
    Tcl application needs to do is to implement a few application-specific
    low-level commands.  Tcl provides many utility commands plus a general
    programming interface for building up complex command procedures.  By
    using Tcl, applications need not re-implement these features.  Third,
    extensions to Tcl, such as the Tk toolkit, provide mechanisms for
    communicating between applications by sending Tcl commands back and
    forth.  The common Tcl language framework makes it easier for
    applications to communicate with one another.

    	Note that Tcl was designed with the philosophy that one should
    actually use two or more languages when designing large software
    systems.  One for manipulating complex internal data structures, or
    where performance is key, and another, such as Tcl, for writting
    smallish scripts that tie together the C pieces and provide hooks for
    others to extend.  For the Tcl scripts, ease of learning, ease of
    programming and ease of glue-ing are more important than performance or
    facilities for complex data structures and algorithms.  Tcl was
    designed to make it easy to drop into a lower language when you come
    across tasks that make more sense at a lower level.  In this way,
    the basic core functionality can remain small and one need only bring
    along pieces that one particular wants or needs.

    	Tk (current release 3.6) is an extension to Tcl which provides
    the programmer with an interface to the X11 windowing system.  Note
    that Tk has been successfully compiled under X11 R4, X11 R5, X11 R6,
    as well as Sun's NeWS/X11 environments.

    The author's home ftp site for the Tk source is the directory
    <URL:ftp://ftp.smli.com/pub/tcl/.
    Note that many users will encounter Tk via the ``wish'' command.  Wish
    is a simple windowing shell which permits the user to write Tcl
    applications in a prototyping environment.

    Tk 4.0 beta is now available.
    Read <URL:http://www.sunlabs.com/people/john.ousterhout/ and
    <URL:http://www.sunlabs.com/research/tcl/ for details.
    Tk 4.0 is expected to be formally released during the first half of 1995.
    Some of the changes planned are:

    - A major overhaul of text widgets (embedded windows, horizontal
      scrolling, better vertical scrolling, more display options such as
      vertical spacing, margins, justification, and baseline offsets).
    - An overhaul of bindings, including the binding tags discussed at
      last year's workshop and  a change in the evaluation mechanism to make
      bindings more composable.
    - A few other changes to event handling, including a new "fileevent"
      command (similar to Mark Diekhans' "addinput") and the ability to
      cancel "after" handlers.
    - A general-purpose and user-extensible mechanism for images, intended to
      handle things like color icons, full-color images, and video.
    - Improvements to colormap and visual handling.
    - A solution to the X resource id wrap-around problem that tends to cause
      errors in long-running applications.
    - A bunch of improvements to widgets, including justification in entries and
      the ability to have multi-line text in widgets like buttons and labels.

    Other things which may appear are:

    - support for Motif keyboard traversal highlight rings and
      completely overhaul the widget bindings to bring them into better Motif
      compliance.  Emacs-like bindings will also be provided for entries and
      texts where they don't conflict with Motif bindings.
    - Application embedding (like Sven Delmas' "tksteal" stuff, I think).
    - Overhauls of the send command, the selection, and the input focus
      mechanism.

    	The future of Tcl and Tk is quite bright.  This year Dr. Ousterhout
    announced that he has been employed by Sun Microcomputer, Inc. to do
    some further development of Tcl / Tk.  Some of the short term (within the
    next 12 months or so) plans that Dr. O has mentioned are:

    - Ports of Tcl and Tk to both the PC and Mac, so scripts written on one
      platform will run on any of the others, presenting their UI in the look
      and feel of the platform on which they run.
    - A commercial-quality graphical interface designer like Visual Basic or
      NextStep.
    - Dynamic loading of C code in Tcl.
    - Incorporating Nathaniel Borenstein's Safe-Tcl back into the Tcl core,
      so that there is a safe mechanism for executing untrusted scripts that
      arrive via the Internet.

    John has given me permission to add this quote as well:

    >From: ouster@tcl.eng.sun.com (John Ousterhout)
    >Newsgroups: comp.lang.tcl
    >Subject: Re: The future of TcL/Tk's Copyright Terms
    >Date: 31 Aug 1994 20:08:19 GMT
    >Organization: Sun Microsystems, Inc.
    >Message-ID: <342nvj$6e9@engnews2.Eng.Sun.COM>

    > I discussed the status of the Tcl and Tk libraries with people at Sun
    > as part of my pre-hire negotiations, and we're in agreement that they
    > will remain free and unrestricted just as they have always been.  Future
    > enhancements made to Tcl and Tk by my group at Sun, including the ports
    > to Macs and PCs, will be made freely available to anyone to use for
    > any purpose.  My view, and that of the people I report to at Sun, is
    > that it wouldn't work for Sun to try to take Tcl and Tk proprietary
    > anyway:  someone (probably me, in a new job) would just pick up the
    > last free release and start an independent development path.  This
    > would be a terrible thing for everyone since it would result in
    > incompatible versions.

    > Of course, Sun does need to make money from the work of my team or else
    > they won't be able to continue to support us.  Our current plan is to
    > charge for development tools and interesting extensions and applications.
    > Balancing the public and the profitable will be an ongoing challenge for
    > us, but it is very important both to me and to Sun to keep the support
    > of the existing Tcl community.  I imagine this discussion will repeat
    > from time to time over the next few years, but I think we can make things
    > work out well for everyone.

    	See <URL:http://www.utdallas.edu/acc/glv/Tcl/usenix95-bof.html for
    more details.

    	John also has asked me to mention the following:
    > there are now pages containing release notes.  The best thing is just to
    > refer people to my home page, which is:

    >     <URL:http://www.sunlabs.com/people/john.ousterhout/
    >     <URL:http://www.sunlabs.com/tcl/
    >     <URL:http://www.sunlabs.com/research/tcl/
    >     <URL:http://www.sunlabs.com/research/%7Eouster/

    > You might put a notice about this in the FAQ to help people who see
    > the FAQ after we reorganize.

    	Extended Tcl (tclX) (Version 7.3b) - This is an extended set of
    commands for Tcl developed by Karl Lehenbauer and Mark Diekhans.  The
    authors' home ftp site for Extended Tcl is <URL:ftp://ftp.neosoft.com.
    Extended Tcl is oriented towards system programming tasks, with many additional
    interfaces to the Unix operating system along with other useful
    utilities.

    	Rush is a Tcl-like extension language announced at the Tcl'94
    Workshop.  Its syntax and semantics are very similar to Tcl's, but it
    additionally offers an optimizing compiler and a new feature called rules.
    Its primary advantage over Tcl is performance within a factor of 100 of C,
    whereas a Tcl compiler is unlikely to do better than a factor of 1000 of
    C.  Rush is not yet publicly available, though ambitious alpha testers
    are encouraged to inquire.  Mail can be sent to either
    <URL:mailto:asah@cs.berkeley.edu> or <URL:mailto:blojo@cs.berkeley.edu>.
    For more information, see the paper
    <URL:ftp://ginsberg.cs.berkeley.edu/pub/asah/papers/rush-tcl94.ps.gz.

    o General information about Tcl and Tk by <URL:mailto:glv@utdallas.edu>
    	(Glenn Vanderburg)

    Tcl (Tool command language) is a freely distributable simple,
    interpreted language designed to be used as a common extension and
    customization language for applications.  It was designed and
    implemented by Dr. John Ousterhout in the hope that application
    designers could spend more of their time on applications and less on
    scripting languages, and in the hope that users could spend less time
    learning new scripting languages for each new application.  Many useful
    applications, some of them sold commercially, use Tcl as their
    scripting language.

    Tcl is clean and regular, and relatively easy for non-hackers to
    learn.  It is command-oriented, and commands added by applications and
    users exist on an equal footing with the built-in Tcl commands.  Tcl
    has both simple variables and associative arrays (tables), and all
    values (including procedure bodies) are represented as strings.
    Simple customization scripts (such as preference initialization
    scripts) usually look much like novice users expect them to: a series
    of simple commands which set options.

    Tcl is implemented as a C library, which can be embedded in an
    application.  The application can add its own commands to the
    interpreter (using a clean C interface).  It is distributed under a
    license which allows use for any purpose with no royalties.

    The Tk toolkit is a Tcl extension (a group of new Tcl commands) which
    provides a Tcl interface to the X Window System.  Tk is one of the
    easiest ways to build a graphical interface to an application, and due
    to the interpreted nature of Tcl, Tk-based interfaces tend to be much
    more customizable and dynamic than those built with one of the C- or
    C++-based toolkits.  Tk implements the Motif look and feel.  A number
    of interesting X applications are implemented entirely in Tk, with no
    new application-specific commands at all.  Tk also provides a
    mechanism by which one application can send Tcl scripts to other
    Tk-based applications running on the same display, for easy
    cooperation between tools.

    Tcl and Tk are mature, and quite stable, but they are not static:
    Dr. Ousterhout has moved from Berkeley to Sun Microsystems, where his
    group is pursuing such projects as a commercial-quality Tk
    graphical interface designer, an on-the-fly Tcl compiler, and
    Macintosh and Microsoft Windows ports of Tk.  He has said that the
    copyright status and licensing provisions of Tcl and Tk will not change.

    As to what Tcl is not - in the context of the discussion in
    comp.lang.tcl, it is not related directly to the Think C Library (TCL)
    available on the Mac.  Confusingly enough, the language concerned with
    here _is_ available on the Mac, and someone in fact may have used Think C
    to compile it there.  Just one of those universal 'coincidences' that
    set the stage for Vogon interstellar highway construction crews.
    Also, Oracle has a product called Tk2Motif which has nothing to do with
    Tcl or Tk as we are referring to it.

Parent document is top of "comp.lang.tcl Frequently Asked Questions (August 31, 1995) (1/5)"
Previous document is "-I- Origin of the comp.lang.tcl FAQ information."
Next document is "-III- Do these packages run on my machine?"