[Vala] Interfacing various languages



Ive been recently peeked about posixvala, the profile thing which was removed. I have updated my repo and it 
works with some limitations.

At the end we dont want profiles for this, we just need a subset of vala. Like asmjs is for js. 

The same applies to vala-objc and i could think of other two possible targets more (vala-java and vala-c++)

As long as its a subset those can be implemented in forks and just rename the program and library names to 
permit installing them as separate packages. This way distros can pack them.

Also, for a project for iOS. One can write in vala and vala-objc, just compiling some files with one compiler 
and others with the standard vala and then link them all together.

The question that it's coming to my mind is the way those forks should interoperate. For c-objc we should 
wrap all those c methods in objc files. For java we can use JNA to call native methods from a compiled vala 
code.

This will allow to create vala apps for ios and android. And why not, firefoxos with emscripten or the maja 
project comes alive.

As a proof of concept i have created a test program in PosixVala that compiles to javascript and interacts 
with the compiler and browser apis to make webapps in vala (firefoxos for example).

Feel free to try it out and let me know what you think.

http://github.com/radare/posixvala (see tests/web)

I think that the target languages should be using a subset of Vala and the code generation should be done in 
a compiler plugin. This way we can reuse the whole compiler logic and just maintain small parts of code. I 
would love to be able to use Vala as a main language for various targets. Like swift did for objc recently, 
for example.

What do you think about extending Vala to support more target languages for interoperability?

--pancake


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]