Wish haxe respected its Ocaml roots more

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

Wish haxe respected its Ocaml roots more

Jordo Odroj
Hi haxe.
Just voicing my opinion that I wished that haxe respected its Ocaml roots more.
Do the developers feel the same? In particular.
Enum Multitypes (already on the radar)  such as type tree = Node of int | Tree of tree*tree
Null being a compiler error
Deep pattern matching.

Ocaml just doesn't offer the same practical syntax like Haxe does, yet it has a much more static compiler.


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Wish haxe respected its Ocaml roots more

Tony Polinelli

Its great that Nicolas has been able to use Ocaml to make the haxe compiler so fast - and it obviously seems to lend itself (as a language). But i think the root idea of haxe was to be a "universal web language" so as a language its roots are more in ECMA so JS & AS. I think that the new and exciting features are great, but keeping the language quite farmiliar to the ECMA crowd is very important.

Maybe the aims of haxe have diverged since its inception, but id think that (for example) something like no "null" would freak out a lot of people wanting to transition, or use haxe as a replacement for js or as3. The benefits of such a feature would have to be quite massive for me to think it is an appropriate change. I am sure a few people wont agree however ;P





On Tue, Feb 1, 2011 at 5:34 PM, Jordo Odroj <[hidden email]> wrote:
Hi haxe.
Just voicing my opinion that I wished that haxe respected its Ocaml roots more.
Do the developers feel the same? In particular.
Enum Multitypes (already on the radar)  such as type tree = Node of int | Tree of tree*tree
Null being a compiler error
Deep pattern matching.

Ocaml just doesn't offer the same practical syntax like Haxe does, yet it has a much more static compiler.


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



--
Tony Polinelli
http://touchmypixel.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Wish haxe respected its Ocaml roots more

Nicolas Cannasse
In reply to this post by Jordo Odroj
Le 01/02/2011 07:34, Jordo Odroj a écrit :
> Enum Multitypes (already on the radar)  such as type tree = Node of int
> | Tree of tree*tree

You don't need multitypes for that :

enum Tree {
        Node( v : Int );
        Tree( a : Tree, b : Tree );
}

> Null being a compiler error

That's already been discussed. We might at some point experiment with it
but it's hard to get right in an OO language.

> Deep pattern matching.

That's more a concern of implementation than something I don't want to
see added.

Now, instead of complaining about the things you don't like, you could
for example submit a patch that works well on all the platforms that
haXe supports. That will show you that :
a) it's more easy to ask than to do
b) contributing code is the best way to make your ideas happen

Best,
Nicolas


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