has anyone talked about an ocaml target?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

has anyone talked about an ocaml target?

Jordo Odroj
I tried to search for the answer to this question, but was unsuccessful. It seems like, even if you don't want to use Ocaml, it would be the easiest one to target, as Haxe mirrors many concepts in Ocaml. In addition, the performance would likely be impressive. I wouldn't be surprised if someone's initial attempt at an Ocaml target was faster than the C++ one (for single threaded apps at least). I don't plan on trying this for a while, but I thought I would say it is surprising that there is no talk of it.
--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: has anyone talked about an ocaml target?

Cauê W.
Well, actually ocaml is a much different beast than haXe... You would likely have to create a pseudo-language inside ocaml, which most likely wouldn't have a great performance, nor would we be able to use any ocaml library.

That's because ocaml is very strict in its static typing, so you can't for example downcast a variable, or also since there is no such thing as a 'dynamic' in ocaml, you would need to create a kind of haxe-enum that would contain either an int or a float, or a string, or a bool, or a class instance, (ocaml enums would be left out and we would not be pretty much able to use it). all classes would have to derive from a reflection-enabled class, and we wouldn't be able to interact with native code.

So... I confess I have thought about it, but they are really incompatible this time, unfortunately !

Cheers!
Caue

2011/2/20 Jordo Odroj <[hidden email]>
I tried to search for the answer to this question, but was unsuccessful. It seems like, even if you don't want to use Ocaml, it would be the easiest one to target, as Haxe mirrors many concepts in Ocaml. In addition, the performance would likely be impressive. I wouldn't be surprised if someone's initial attempt at an Ocaml target was faster than the C++ one (for single threaded apps at least). I don't plan on trying this for a while, but I thought I would say it is surprising that there is no talk of it.
--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org