users@codemodel.java.net

Re: Re-Post: Finer grained controll over the code model.

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 02 Jan 2007 11:56:50 -0800

Benoit Callebaut wrote:
>> But I think discussions in detail seems useful. Do you have anything
>> in particular that you'd like to fix? Should this discussion move to
>> users_at_codemodel.dev.java.net?
>
> Good idea.
> I need to make a deeper analysis of what I can do with the actual API,
> what is difficult to do and what is not possible before asking changes.
> My first intention was to launch the discussion about possible changes
> to the API to avoid chaotic changes/proposition to the API.
> I need to share my ideas on it an receive feedback on points like :
> * understand design choices in the codemodel

The original code model design was inherited from another team, so I'm
not the one who designed it, although I've made some changes since then.

As I understand the code, the design choices are:

- CodeModel supports generation of Java code via building AST, thus
eliminating formatting and syntactic concerns from the client program,
such as indentation, "import" statements, use of parenthesis.

- CodeModel supports fluent API, where a tree can be constructed without
using a lot of intermediate variables, and client code reads in the same
order as the generated program.

> * show with code snippets what I don't like in the API or the use I make
> of it and receive feedback on it.
>
> So your idea to move the discussion seems really good to me. Anything
> that can improve the codemodel without breaking the great job already
> done is fine for me.

It's also possible to create a separate library based on the discussion,
like codemodel2 or whatever, as long as we can keep the current
codemodel intact.

> I don't want to break JAXB (or someone else do) because, I had
> nightmares after SUN broke the compatibility in JAXB 1 (or pre 1.0).

Ouch. I'm sorry about that...

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com