commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <>
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

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

Howard M. Lewis Ship
Creator, Tapestry: Java Web Components

> -----Original Message-----
> From: J.Pietschmann [] 
> 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:
> For additional commands, e-mail:

View raw message