On Wed, Apr 13, 2011 at 11:35 AM, Ryan Davis ryan@acceleration.net wrote:
When working on a larger lisp code base, one with 10+ files in one package, I begin to get nervous about accidental name conflicts, and was wondering how other people deal with this.
I used to work on some large Lisp systems in a place where standard practice was often to let packages grow very large -- much larger than 10 source files -- and as I recall, name collisions occurred remarkably rarely. And often when they did happen, the two functions actually had the same or very similar contracts.
I think part of the reason for this was good naming practices. As a general matter, the more specific the purpose of a routine, the longer its name should be. If it's used only in one file, there should be at least one word in its name that identifies it as related to the other code in the file, such that that word is unlikely to appear in unrelated code.
If that doesn't satisfy you, you're welcome to try my lexical contexts package:
http://common-lisp.net/cgi-bin/viewcvs.cgi/devel/src/contexts.text?rev=1.1&a... http://common-lisp.net/cgi-bin/viewcvs.cgi/devel/src/contexts.lisp?rev=1.1&a...
I've found it handy on occasion, though I don't use it for everything by any means.
-- Scott