- See these PostScript files for observations on portable Tcl coding.
- Stay away from platform specific extensions, including DDE, Registry and AppleScript.
- See Microsoft Windows for some information about windows.
- Use file rather than exec or self parsing file names, etc.
- Avoid exec, because different OSs support widely different commands.
- Avoid depending on console, which currently is not available on Unix.
- Avoid puts to stdout and stderr (especially in library code), which might not be available for graphical applications on Microsoft Windows and MacOS.
- Make certain your code can accomodate file paths with spaces in them.
- Avoid setting environment variables to the empty string. On Windows, that causes those variables to be unset.
LV 2006-Feb-16 A discussion of best practices for making use of file is in order, for I've seen people recommend file join, file nativename, and file normalize, but would love to see practical coding examples showing how one can write code (both Tcl and Tk) for gathering file names from users, generating new file names, etc.