- Everything can be a string (used to be "Everything is a string")
- Everything is done using commands.
- The $ sign is only a convenient shortcut for the "[set ...]" command. - FP
- All commands are treated equally.
- A command is a sequence of whitespace separated words.
- Each word in a command is treated the same (*before* passing to the command).
- No artifical limits.
- Provide simple building blocks.
- Things should be as general as possible.
- Use the best tool for the job. Often Tcl can be the best tool but not always.
- Event driven is good.
- Event driven is good.
- Threads are really little processes inside a big process and therefore should be isolated/protected from one another.
- Data shared between threads should be explicitly requested.
Internationalization
- Unicode is good, for just about every language.
- UTF-8 is good for representing Unicode, when most often you have low-ASCII characters. (RS)
- Error messages should be helpful and friendly.
WHD wrote in comp.lang.tcl, 2002-11-19:It came to me in a flash this weekend: The Tcl Way is the relentless exploitation of ambiguity.Examples:
- Q: Is .frm.btn a command name, a window name, or the position of a window in a hierarchy?
- Q: Is "set a $b" a command, a string, or a list?
- Q: Is "orange" a color, a fruit, or the start of a shopping list?
- Q: Is "I" a pronoun, a Roman numeral, or a tally counter (the one where you write 4 bars and then strike them out before writing the next bar)?
No one would consider this sentence a list... looks much more like an enumeration, all of a sudden.20no02 WHD - I agree that it's highly natural--but it's far from the norm in computer languages. But really, I posted that on c.l.t mostly because I think it's 1) true and 2) amusing. I'm not at all sure it's helpful for newcomers to the language.2002-11-20 RS: They should be aware of the fact that there's only strings ("data typing is an illusion"), and views on how to interpret these strings - in Clif Flynt's example
set set setthe parser interprets the first "set" as command name, doesn't bother about the other two, and calls set with them. set interprets its first argument as variable name, looks it up or creates it, and assigns it the second argument as value. This "parser thinking" makes understanding Tcl much easier than experiences with other languages.. so newcomers should be hinted at it early. (Oh, and I love Tcl because it is "far from the norm in computer languages" - if ever there is one that covers LISP, APL, Fortran, C++..)Neat, "set set set" is a great example to explain things with -jcw
See also The Tao of Tcl