Forum OpenACS Q&A: Response to namespaces: to use or not to use?

Collapse
Posted by Stephen . on
Proc names already do not collide, but they're prefixed with something-underscore rather than something-double-collon.

What the something prefix should be is a naming, not a namespace issue and applies equally whether the separator is an underscore or two colons. Your suggestions for names sound good to me, as is your suggestion that named parameters be used.

The typing saved by calling procs with a shorter name from within packages is minimal, and so far not an often used feature.  It also goes against the grain of being explicit to aid readability at the expense of extra typing introduced by widespread use of named parameters.

What is actually being described here is a complete renaming of the toolkit API, not a technical fix for which the Tcl namespace feature is appropriate. I'm not necessarily against this, but if we clearly label it for what it is we can adress any problems.

Developer Tips are one band-aid solution to the problem of the toolkit being rendered largely a bad example of it's own usage because of API renaming.  'Band-aid' because documentation is a last resort ('no one reads documentation...'), by-example copying is a primary source of information.

If we're looking for developer guidlines then I would suggest the following:  If you rename APIs then also ensure all the code that references the old name is fixed.  At the least, fix the packages that are enabled with a default install.  At the very least, give a heads-up on the bboard.