incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Heidegger>
Subject [RT] haxe reality check
Date Thu, 23 Feb 2012 03:50:59 GMT
Hello List,

Thinking about it a little I think its good to clear up the mind about 
haXe. So I want to summarize the things about it

   * ... contains a very fast and good avm2 bytecode compiler (that does 
things Falcon will do in future - today).
   * ... has established and tested a way to create JavaScript code from 
a AS3-like language.
   * ... is also a language and it has a bunch of language features that 
would help AS3 dearly.
   * ... has a system called Macros that would allow us to implement e4x 
like structures or bindings on top of existing code.

Now, I see two ways Apache Flex could leverage haXe:

   1) Port Apache Flex from AS3 to haXe.
        haXe compiles to swcs. If Flex were to be ported to haXe and 
creates the swcs with the same content then
        AS3 projects could continue to leverage those swcs but also 
switch to haXe as a programming language. There
        are some things important to know for this:

           - haXe does not have any e4x support yet and there are no 
plans to add it to the language. Any support would need
             to be done using Macros.
           - haXe does not offer standalone functions/variables so it 
will not be possible to entirely replicate the current API
           - haXe does not offer namespaces, we would need to drop those 
code or become incompatible on swc level.

   2) Branch the haXe compiler and add AS3 syntax.
        Create a new compiler based on haXe without breaking 
ActionScript 3 and implement features such as e4x,
        regexp (is currently done using strings), namespaces and other 
operators. And it would need to implement
        MXML - lots of work. There is just one thing that bugs me, aside 
from the ton of work:

          - the haXe compiler is GPL - that means its category-X [1] - 
the resulting compiler could not be hosted on Apache

With both approaches there would still be open to:

   - Implement compilation of various embedded assets such as 
   - Create sophisticated documentation templates - rudimentary in haXe

I hope I didn't forget anything crucial.

My personal conclusion is that haXe is a nice system. It achieved a lot 
of things but: without major efforts in haXe as
a system (compiler/tools) its not possible to migrate Flex. A change in 
language comes with new
concepts and ideas and Flex would logically be built differently for 
haXe. Porting flex to haXe seems less
reasonable than writing a new system for haXe to me and I wouldn't name 
that Flex. Using the compiler for an alternative
compiler for AS3 sure seems fun and if it ever bears fruits I will be 
glad to use them.



View raw message