pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Lhoste <Phi...@GMX.net>
Subject Re: using annotations for binding between XML/Java elements
Date Wed, 06 May 2009 06:31:27 GMT
On 04/05/2009 16:26, Noel Grandin wrote:
> Once you get into code generation, the world is your oyster :-)

That's the road taken by JavaFX: to generate Java code out of their 

> But it definitely makes deployment a little harder (one extra build
> step), and code generation is not trivial.

Indeed. Processing "language" (http://Processing.org) took this road, 
using Antlr (a modified Java grammar): they take a simple "script" and 
add a class declaration, a main() method, handle properly imports, adds 
F at the end of literal decimal values, replace occurrences of 'color' 
"keyword" by 'int', etc.
This makes it much easier to write small programs for newbies, while 
remaining fully compatible with Java.
But the drawback is that the author never had the time to update to Java 
1.5 syntax (a quite different grammar file, available but yet to modify) 
so we don't have access to typed collections, for each loops and such...

A pre-processor is cool, but is quite some work to make it work and to 
And too much might be badly perceived by users (some people love JavaFX 
language syntax, others hate it! -- I am in between, some features are 
cool, others are irritating).

Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

View raw message