Hello everyone,
I just discovered Haxe, and I’m really excited to learn it and use it on my current project.
I know very well C++, Python and Java, so I’m sure I will learn it very fast, but I feel I will need practice to understand all subtleties of Haxe.
Before starting, I have some questions, to be sure it suits my current needs.
I rapidly explain my needs. I am developing a high level solution, multi-platform and multi-language, splitted in many projects (with inter dependencies), and each project has dependencies to other frameworks and libraries. Some projects must be available in any language (at least most popular object oriented: python, java, C++, C#). There’s the problem of dependencies that are not multi-platform and multi-language, so I will use bindings when possible, and probably IPC with dedicated external processes. Some projects will be very specialized and thus available only in some target languages (ex: project with real time needs). In some cases I will have to specialize how actions are done in each target language, because they must be developed differently with dedicated algorithms.
Yes it’s a very big project and very complex, I’m a little bit masochistic
In fact some parts of some projects were already coded, in different languages (C++, Python, Java). I want to unify all functionalities in a global solution, by rewritting all from scratch (need core refactoring).
As there’s a lot of work in each target language, I looked for a meta-language so that most coding effort is done one time for all target languages to save a lot of time (in development, synchronization between languages after evolutions, testing each language version,…). If I have well understood, Haxe is currently the best solution for this, perhaps even the only one.
I know that, if I use Haxe, I will have to use almost all abilities of Haxe and libraries. I will probably create missing libraries, or make workarounds with external processes and IPC (like zeromq).
I looked rapidely documentation, and I still wonder if I will be blocked by some Haxe limitations. Perhaps I missed some documentation parts.
Can you explain me:
- How develop a project with 90% of code in Haxe and specialize 10% in each target language (I mean same functionality/interface specialized in each target language) ?
- Is it possible to compile and launch a Haxe project directly (without target language) ?
- Is 2. possible if project has a dependency (library) that is usable only in a target language (ex: C++) ?
- How create a binding to an installed system library written in another language (it can be a solution for 3.) ?
- Is it possible to call an external framework API existing only in a target language without creating a dedicated Haxe library (or a binding like in 4.) ?
- … it will come later
My questions are perhaps too large, it’s because my needs are large.
For question 4., consider for example an API existing in C++, that can be binded with swig in other languages like OCaml.
For question 5., consider an external API written in Python or Java, and this API would like to be called in Haxe code.
I have more precise examples if needed to clarify my questions, but I need global responses.