Version 18 of Tcl mantras

Updated 2002-04-10 16:56:22

Purpose: to collect a variety of commonly used phrases, often referred to within the Tcl community as mantras relating to Tcl.

everything is a string

Tcl runs everywhere.
The preference of most is that the functions in libtcl should be, as much as possible, cross platform across at least Unix-like, Windows, and to a lesser degree MacOS, VMS, etc. Platform specific functions go into extensions, with those potentially being wrapped up into the same tar file as libtcl code.
Keep Tcl small.
The Tcl philosophy is to keep libtcl relatively small and to create add on extensions to provide extended functionality

Batteries Included

Use extensions, don't bloat.
The Tcl philosophy is to EXTEND the language via extensions when specific applications need a new feature - not to create a single library containing every imaginable function that every programmer since the beginning of the computer age ever needed. Developers should work on becoming more comfortable using existing extensions or writing their own rather than expecting an all in one language.
If you want something done, TIP it.
For something to be changed in Tcl, be prepared recruit a developer (or gird your loins for battle) and submit a TIP providing details of what s/he plans to do to add functionality in the core, and be prepared to discuss/debate/argue your case.
   '''Complete patches to Tcl include tests and documentation''': When submitting changes to Tcl, the minimum amount of work to be expected would be updated test cases and documentation, along with the code changes. 
Error messages are your friends.
Most of Tcl's error messages are so detailed and legible that they almost serve as an online help system. If you write error messages, try to write them so that a user is almost glad to see them.
   '''Error messages tell what; ::errorInfo tells context.''':


   '''Only [catch] when you know exactly why.''':


See also The Tao of Tcl