Check out the new USENIX Web site.
7th USENIX Tcl/Tk Conference
Home  | At a Glance  | Register  | Tutorials  | Technical Sessions  | Organizers  | Hotel & Travel  | Activities

T5pm Tcl Internals: Raw and Exposed  [Tutorials at a Glance]  [PDF format]
Lee Bernhard, Scriptics Corporation

Who should attend: Tcl extension developers and Tcl programmers interested in learning about the Tcl C internals. Students should have a solid background in Tcl and C programming.

In Tcl, everything is a string—sort of. Tcl 8.x allows you to write scripts which pretend that everything is represented as a string, while it silently uses a dual-ported object system to cache native types. Tcl's byte compiler allows script writers the convenience of an interpreted language during the development process, while generating byte codes to speed evaluation of procedures and loops. This tutorial looks behind the curtain to explain the Tcl internals, and shows how to write Tcl and C code that takes advantage of the new architecture.

Topics include:

  • How to write extensions that make use of Tcl_Obj'ects for caching native types
  • How to invent new object types to aid you in representing your own structures in Tcl
  • How to avoid writing scripts that cause data type shimmering that negates the advantages of the object system
The second part of the tutorial will focus on additional issues in extending the newer Tcl interpreters. Additional topics include:
  • How to write code that takes advantage of the byte compiler
  • How to add a Tcl interpreter to an existing C application
  • How the stubs architecture allows you to write extensions that port across Tcl versions without requiring serious modifications
The course materials will include code samples that illustrate the proper use of these features. After completing this tutorial, participants will be aware of how to extend Tcl in a way that takes maximum advantage of the new internal architecture.

Lee Bernhard has been involved in the Tcl community for five years as an instructor and developer. He has taught thousands of hours of Tcl/Tk courses at Bell Labs, and he founded the Scriptics Tcl training organization. He has recently joined the Scriptics engineering team to again concentrate on development. His engineering projects include the Windows port of [incr Tcl], and adding multi-threaded support to Tk. Lee's computing interests include scripting, object-oriented languages, and distributed systems. Lee holds a BS from Duke University in Computer Science and Cognitive Psychology.


?Need help? Use our Contacts page.
Last changed: 11 Nov. 1999 jr
Conference index
Events index
USENIX home