MathGroup Archive 2003

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

Search the Archive

shadow-proofing a package

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42712] shadow-proofing a package
  • From: Selwyn Hollis <selwynh at earthlink.net>
  • Date: Tue, 22 Jul 2003 04:40:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

The following occurred to me as a way to prevent the shadowing problem:

Before BeginPackage["blah`blahblah`"] put

Remove@@( StringJoin["Global`",#]&/@
    Intersection[Names["Global`*"],
		{"name1", "name2", ... for all symbols defined in the package}] )

This seems to work well. But surely there must be some downside to it, 
or else it would already be the recommended way of doing things. What 
am I overlooking here?

-----
Selwyn Hollis
http://www.math.armstrong.edu/faculty/hollis


  • Prev by Date: How to generate list of long division auxillary numbers?
  • Next by Date: Re: Recovering f[z] values?
  • Previous by thread: How to generate list of long division auxillary numbers?
  • Next by thread: Re: shadow-proofing a package