Nicolas Cannasse wrote:
I like your solution with __resolve__ but worry that neko will have to
continue adding things to support other OO systems / languages in
order to support a simple mapping. This might make the core language
harder to understand and the implementation more complex?! Something
to look out for at least...


Yes that's why __resolve__ is resolving a lot of problems, by allowing language-specific resolution. I'm still thinking about maybe supporting chained __proto__ also.

Nicolas

Follow-up : I finaly choose to add object prototypes in Neko. I will wait more to decide about __resolve.

There is two new builtins for this :
$objgetproto(o) and $objsetproto(o,p)

--
var proto = { hello => function() { $print(this.msg) } };
var def_inst = { msg => "hello" };
$objsetproto(def_inst,proto);

// create an instance
var o = $new(def_inst);
o.hello();


Nicolas

---
Neko : One VM to run them all

Reply via email to