Two little questions.

1. Has Neko an equvivalent of ternary operator? I mean construction like "var foo = bar ? value1 : value2".

Yes, it's called "if" :

var foo = if( bar ) value1 else value2;

2. Is it possible to expand current variable scope with values from an external module? E.g. I have module which exports foo() and bar(). Somewhere in other code I wan't to use foo() and bar() functions in this way:

$loader.loadmodule("my-module", $loader);
foo();
bar();

// instead of
tools = $loader.loadmodule("my-module", $loader);
tools.foo();
tools.bar();

No, you can't do that, since the variable scope is static in Neko, not dynamic. That's a property of a compiled language compared to an interpreted one.

Nicolas


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

Reply via email to