Version 0 of How to build good packages

Updated 2001-02-07 11:36:30

From a comp.lang.tcl posting by Larry Virden

1. Avoid simple, obvious names for your namespace - someone else probably is also using it. You can register namespaces at:

http://www.nist.gov/nics

(Quote from http://www.purl.org/net/tcl-faq/part2.html :)

035. An interesting site is http://pitch.nist.gov/nics/ , which is a database registry for various domains of topics. Don Libes has created a Tcl domain where one can, for instance, do a search for rand and find pointers to various implementations of random number generators for Tcl. The NICS paper Don presented at one of the Tcl conferences is found at http://www.mel.nist.gov/msidlibrary/doc/usenix.ps . See also the news article [L1 ] for an explanation Don posted to news:comp.lang.tcl . A domain has also been created at the NIST Identifier Collaboration Service for Tcl object types.

2. Avoid global variables, procedures, etc. - they are almost certain to clash with something someone else has done.

3. Avoid hard coding pathnames, socket numbers, etc. - they are almost certain to clash with how someone else needs things configured. Trying to force someone else to do things your way is a great way to lose friends and influence enemies...

4. Make a variety of docs available - man pages for Wnix users, winhelp for Windows users (if your package can be used there), html for Mac and other platform users, etc.

5. Make it easy for users to report bugs - and let them know when the bug fixes are available...

6. Keep up with the latest releases of Tcl.

7. I know that for me, I appreciate it when packages use the same terminology in the same manner as Tcl when doing configuration. Moving things around, requiring binaries from the Tcl source directory, etc. is very annoying.


See Writing Extensions for general information about writing Tcl extensions.