help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emulating namespaces


From: LanX
Subject: Re: Emulating namespaces
Date: Wed, 08 Dec 2010 15:11:25 -0000
User-agent: G2/1.0

do I get it right switching the package means that will bind variables
in the following code to different symbol tables?

> Also, we could just use emacs-cl...

ehm do you wanna tell me that (require 'cl) already provides support
for namespaces?
So why bother?

Could you plz show me some code that reflects the behavior of the perl
snippet I posted?


---------------
{
  package Namespace;
  our $var=666;

  sub tst {print $var }

}

package Outerspace;

$var=42;
Namespace::tst(); # prints 666
---------------

I'd like to run some tests...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]