On Tue, 2006-01-10 at 15:09 +0100, Nicolas Cannasse wrote:

> >>Globals are "per module" at runtime so when linking it's normal that
> >>globals are not merged either. (this ensure also the sandbox : several
> >>versions of the same module can be loaded and they will not share the
> >>same global table). If you want to communicate between modules you need
> >>to use the $export table.
> >>
> > 
> > Yes, it's natural. Sorry I had previously missed the $exports builtin.

> Yes exactly.
> It's far better than C for example where you can't control appropriatly 
> what is getting exported.

huh? C modules (translation units) allow you to decide
what gets exported (extern linkage) and what does not (static
linkage). Accessibility is controlled separately (with header 
files).

Futhermore with dynamic loading you can load any
exported symbol from any library entirely dynamically.

C++ gives you more options .. and Felix even more
(you can construct a module to contain just about any
thing you want in Felix).

Hmm .. does Neko have private symbols? If you have
$export you need that (privates don't get exported,
its for helpers that are part of the implementation
but not part of the interface).


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


--
Neko : One VM to run them all (http://nekovm.org)

Reply via email to