commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hls...@comcast.net>
Subject RE: Code generation was: Re: [collections] contribute?
Date Thu, 21 Aug 2003 21:29:38 GMT
I have a deep aversion to code generation and build time because of all the issues below.

However, I am becoming very, very fond of creation of classes at runtime, using Javassist
(or
equivalent).

That's where the power of interfaces comes into play; if an object implements an interface,
it
doesn't matter when it was created, so create it on the fly.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/


> -----Original Message-----
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
> Sent: Thursday, August 21, 2003 2:35 PM
> To: Jakarta Commons Developers List
> Subject: Code generation was: Re: [collections] contribute?
> 
> 
> __matthewHawthorne wrote:
> > There are many times that I've wished I had found a nice way to 
> > autogenerate things while creating a bunch of redundant primitive 
> > methods.
> 
> There are half a zillion methods for generating code, 
> starting with Bash/Sed/Perl hacks, leading to dedicated macro 
> languages like the C preprocessor and m4, continuing with a 
> variety of web templating languages like PHP, there's XSLT 
> and finally high level stuff like lex/yacc, ANTLR and all the 
> other grammar generators.
> 
> The recurrent problems:
> - Need dedicated Ant tasks (Make was a bit easier here)
> - IDEs rarely handle them well
> - Tracking compile and runtime errors caused by generated code
>    to the ultimate source isn't well supported and often painful
> 
> I personally use ad-hoc generators mainly to bootstrap code, 
> once the bulk of the code is stable, I abandon them.
> 
> J.Pietschmann
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


Mime
View raw message