Version 9 of Tcl language profiles

Updated 2012-05-24 07:56:46 by dkf

What does it mean for a language to be called “Tcl”? It surely cannot just mean that it is built from C via libtcl; there must be something deeper than that. Well, the Endecalogue/Dodekalogue must have something to do with it of course, but is that all? I suspect not; you can't do anything without more than that. So on this page, I'm going to try to identify what additional things have to be there to make up something that we'd recognize as Tcl. In particular, I'm going to identify “profiles” that comprise a particular language core, related semantics and minimal associated set of commands; these profiles will build on top of each other of course.

Profile: 7

This profile approximates the language that was there in Tcl 7.*

Rule set
Endecalogue
Semantics
All values are strings. There is an undifferentiated space of (global) commands, indexed by name, and a second undifferentiated space of global variables (well, except for arrays).
Commands
set, expr, source, if, while, for, foreach, append, lappend, lindex, llength, list, eval, proc, global, upvar, uplevel, return, break, continue, error, info (but only info exists of the subcommands is necessary), string (minimal list of subcommands: string compare, string first, string last, string range, string match), puts

Profile: 7+

Everything in 7, but also with after, open, close, gets, read, fconfigure, fileevent, eof, fblocked, update and vwait. (i.e., the event and core IO system). Also supporting socket is recommended, but not required. Note that it is up to implementations to define the meaning of "filenames" used by open.