The Mathematica Journal

Search

About the Journal
Current Issue
Editorial Policy
Submissions
Back Issues
Contact Information

index.html

Power Programming

Contexts and Shadowing

Volume 6, Issue 2
Spring 1996
David B. Wagner
 

Contexts are a mechanism for ensuring that symbols created by a package are distinct from symbols created by the user od by other packages. The biggest problem with contexts is shadowing, a situation in which a symbol in one context prevents the user from referring to a symbol of the same name in a different context. In this article, we first describe how packages use contexts and then we survey tools and techniques that exist for dealing with the shadowing problem. Finally, we develop a new package, AntiShadow.m, that prevents the most common form of shadowing.

     
About Mathematica 
© Wolfram Media, Inc. All rights reserved.