skaller wrote:
On Tue, 2006-01-10 at 18:05 +0100, Nicolas Cannasse wrote:
Futhermore with dynamic loading you can load any
exported symbol from any library entirely dynamically.
I have some problems with the C dynamic linker.
You are not alone .. :)
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).
What is the difference with globals ?
Well an example from Felix shows:
[...]
Oh .. just to be clear, modules aren't objects at
run time: they just provide a name lookup model.
All the variables in a module outside any function
are global variables. Variables declared outside
an explicit module like this:
In Neko there is modules but they're abtract. Most of the time you only
deal with export tables which are objects.
// test.neko
var x = 0; // local
z = 0; // current module global
$exports.y = 0; // "public" variable
Then when loaded, this module only contains "y" and the module abstract
type :
var m = $loader.loadmodule("test",$loader);
$print(m.y); // 0
$print(m.z); // null
$print(m);
Nicolas
--
Neko : One VM to run them all (http://nekovm.org)