Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: namespace collision [bug]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68701] Re: [mg68684] namespace collision [bug]
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Thu, 17 Aug 2006 04:18:06 -0400 (EDT)
  • References: <200608160736.DAA06156@smc.vnet.net> <NDBBJGNHKLMPLILOIPPOAENAFBAA.djmp@earthlink.net> <acbec1a40608160915h5de5f7f8w2de875f36d4c364f@mail.gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Jens-Peer Kuska let me know that I am not following the proper
convention for loading the private context. I should be using a
backquote *before* the Private` context. This prevents the namespace
collision. I'm sorry for calling the behavior a bug.

On 8/16/06, Chris Chiasson <chris at chiasson.name> wrote:
> Thank you for the confirmation.
>
> Jean-Marc Gulliet gave a workaround: reverse the package order
>
> On 8/16/06, David Park <djmp at earthlink.net> wrote:
> > It looks like a bug to me.
> >
> > David Park
> > djmp at earthlink.net
> > http://home.earthlink.net/~djmp/
> >
> > From: Chris Chiasson [mailto:chris at chiasson.name]
To: mathgroup at smc.vnet.net
> >
> >
> > As far as I know, a named pattern created inside the A`Private`
> > context should not interfere with the definition of a symbol with the
> > same name from B`. Will someone verify this as a bug? Will someone
> > please provide a workaround?
> >
> > In[1]:=
> > BeginPackage["A`"];
> > funA::usage="";
> > Begin["Private`"];
> > funA[funB_]:=funB!;
> > End[];
> > EndPackage[];
> > BeginPackage["B`"];
> > Off[General::spell1];
> > funB::usage="";
> > funC::usage="";
> > Begin["Private`"];
> > funB[_]:="you called funB";
> > funC[_]:="you called funC";
> > End[];
> > EndPackage[];
> >
> > In[16]:=
> > funB[5]
> >
> > Out[16]=
> > funB[5]
> >
> > In[17]:=
> > funC[5]
> >
> > Out[17]=
> > you called funC
> >
> > In[18]:=
> > $Version
> >
> > Out[18]=
> > 5.2 for Microsoft Windows (June 20, 2005)
> >
> > --
> > http://chris.chiasson.name/
> >


  • Prev by Date: Re: perplexed by blank sequence in pattern replacement
  • Next by Date: Re: perplexed by blank sequence in pattern replacement
  • Previous by thread: namespace collision [bug]
  • Next by thread: Re: namespace collision [bug]