Re: shadow-proofing a package
- To: mathgroup at smc.vnet.net
- Subject: [mg42718] Re: shadow-proofing a package
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 23 Jul 2003 00:25:11 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <bfiu78$j8a$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, say you have stored the result of a 4 week computation in one of the variables that are removed by the package. Just load the package and destroy your work without a warning -- sounds great ! Regards Jens Selwyn Hollis wrote: > > 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
- Follow-Ups:
- Re: Re: shadow-proofing a package
- From: Dr Bob <drbob@bigfoot.com>
- Re: Re: shadow-proofing a package