>> And I am also proposing that NekoVM should add support for interface >> declarations on builtins. Then HLLs can scalably interopt, by exposing >> their interfaces in common data type layer. I do not see how you can >> possibly get scalable interoption without? > > Interoperability at the OO level is hard to achieve, especially since > all OO languages have they own OO features. NekoVM does not do much to > help there, it just let you do all the operator overrides and give you a > runtime on which you can emulate efficiently enough the different OO > features a given language have (which is already difficult enough).
Why is the support of simple interfaces not sufficient for interoperability between HLLs? http://haxe.org/ref/oop By interface, I mean a declaration of global functions and the public members (methods and data) of a class, without support for virual inheritance or any other syntax. Each argument of a method/function will be a common data type or a class interface. That will not expose externally the additional OOP features of each HLL, but it isn't necessary. All OOP features in the universe can be achieved/emulated from simple interfaces as I have described above. Or can someone give me an example otherwise? For example, delegates are merely a tuple of <object, method>, which could be 2 arguments of an interface or an object argument with 2 members. Also to not support simple interfaces is to throw away all of the OOP interoperability, when perhaps 80% of it is straightforward via simple interfaces, even without the potential for emulation of other OOP features behind simple interfaces. Or can someone give me an example to help me realize that is not the case? Note that I already explained in prior posts why virtual inheritance is an undesireable feature for OOP, but even if one disagrees, I assert that supporting virtual inheritance cross-language would explode in complexity. NekoVM would need to add enforcement of data types on function arguments, in order to add support for enforcing interfaces as function arguments. One could argue that this enforcement only needs to be done during the compilation of the HLL to Neko, for HLLs that do type checking at compilation? For example, is there any way I can tell HaXe to respect the global function interface of a "C FFI" call on the NekoVM? It is not so nice to have a great type checking on HaXe and then have no option for type checking on interoperation with the "C FFI" or with code compiled from other HLLs to NekoVM. > The other option is something like .Net which have a very complex OO > system on which a lot of languages can plug. I prefer a more single > OO-agnostic model like NekoVM on which everybody can build their own > features. > > Nicolas Agreed on the undesireability of supporting cross-language interoperability for OO features beyond simple interfaces. I gave some of my reasons in the prior posts. And there are other reasons, e.g. keeping the VM small (more optimized, more robust, smaller footprint, etc), etc.. Rather than being OO-agnostic, what is wrong with supporting the common denominator of all OOP, which are simple interfaces? -- Neko : One VM to run them all (http://nekovm.org)
