Version 9 of Tcl Canon and Fugue

Updated 2004-06-01 03:05:42 by CMCc

(Aiming for something between Wittgenstein and Bach, will probably end up like - CMcC)

0. The simplicity of Tcl stems from its simple syntax and processing model

The application of the Endekalogue to a value, followed by the resolution of [lindex $cmd 0] as the name of a functor and its application to [lrange $cmd 1 end] as arguments is the fundamental form of Tcl.

1. The extensibility of Tcl stems from its processing model

proc {upvar; X; [uplevel Y]; return;} is a skeleton which allows you to create and extend any tcl command or proc.

2. The universality of Tcl stems from the fact that values have string representation

It is not precisely true to say everything is a string, but everything which has a value has a string value. So any processing can be performed on strings.

2a. Tcl has a rich set of string operators

This enables X (1. above) to decide what to do in the surrounding processing scope, and Y to effect it.

3. Tcl has many powerful naming capabilities

3a. proc introduces and defines a functional name,

3b. global upvar variable set and array create named state.

4. Tcl has several name resolution scopes

4.1 namespace partitions the global naming scope. The naming convention of using ':: to explicitly navigate these partitions.

4.2 interp forks the global naming scope.

4.3 thread forks the top level interp