MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: shadow-proofing a package

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42774] Re: shadow-proofing a package
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Fri, 25 Jul 2003 05:08:24 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 7/24/03 at 4:10 AM, drbob at bigfoot.com (Dr Bob) wrote:

> Why would Selwyn or I write a package that depended on a symbol we were 
> likely to use for storing a 4-week computation?  Do we really look like 
> idiots?

> On the other hand, that begs the question: why worry about shadowing at 
> all, if we can, instead, choose good names that aren't likely to conflict?

In fact, this is very easy to accomplish with consistent naming conventions. If all of the exported function names begin with upper case consistent with Mathematica's internal naming conventions and you consistently use lower case for working notebooks, there will clearly be no conflict. In that case, the first approach Selwyn Hollis mentioned would work fine.

So, the real issue is the intent of the package being written. If it is intended for personal use, then any approach you are comfortable with that works should be acceptable. OTOH, if it is a package you want others to be able to use, you should not make any assumptions about the environment at the time the package is being loaded. In this case, it would be very bad to simply remove symbols without giving the user the ability to decide whether that was appropriate or not.


  • Prev by Date: Re: Mathematica and RedHat 9
  • Next by Date: Re: Problem with Show, Can't Give More than 5 Arguments
  • Previous by thread: Re: Re: shadow-proofing a package
  • Next by thread: Re: Re: shadow-proofing a package