Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

immutable: reimplement core model and processing #17

Closed
elucash opened this issue Aug 14, 2014 · 2 comments
Closed

immutable: reimplement core model and processing #17

elucash opened this issue Aug 14, 2014 · 2 comments
Milestone

Comments

@elucash
Copy link
Member

elucash commented Aug 14, 2014

Given that we have state of art templates that provide huge amount of power and functionality, the problem is with core models and processing, which is clumsy, ad-hoc-ish and dirty. We have a lot more ideas on how to employ annotation processing and there's a clear need for advanced model and toolkit behind. It's not to say that templates doesn't require a cleanup, but this is totally different thing.

For this issue I also want to investigate the model in google's AutoValue project to see if there will be some touching points in design, which might lead to contributions both ways.

@elucash
Copy link
Member Author

elucash commented Aug 31, 2014

Current vision is to try very ambitious but promising way (which have high potential to fail ;) ).
Currently, I'm prototyping modeling framework to be used as base to a wide range of annotation processing meta-programming tasks.

Just some concepts and ideas

  • Flexible and extensible transformation/adaption layer
    • we already have javax.lang.model as PIM (kinda) and don't want to invent new generalized wrapper model
    • but we want a way to efficiently query and extends this model to create PSM (kinda) used for code generation
  • Ultra clean, simple, readable, and DRY, compiled templates
    • Please, no Velocity, no Freemarker... you name it. It will take too long to explain, but those are just not suitable
    • Rhino/JS based templates served well, but I want to get rid of dependencies. Nashorn is not a choice currently, but was considered. Extreme performance still matters!
    • Should closely resemble programming model of current templates
      • It all started in 2011 with experimenting with MOF M2T templates and Modisco models, which showed quite prominent way of doing things, but since approach departed greatly, but the spirit is still there
      • Don't want to drag in half of Eclipse with EMF, Acceleo, Xtend whatever
    • Ability to extend templates by injecting contributions to extension points. This need to play well with model transformation extensibility
  • Most important principle: total eating of own dog food
    • Immutables will be coded on the new modeling framework and modeling framework itself will be initially built by a special fork of Immutables
    • Self-bootstraping: modeling framework will be further built using it's previous version

@elucash
Copy link
Member Author

elucash commented Oct 30, 2014

Vision almost fulfilled ). Although result is not as ambitious as it was envisioned and a lot of unwanted carry overs from the old version occurred, it's still pretty cool. The next step would be to create something like clear and disciplined type resolution toolkit to work with generic types and inheritance. This would replace current very ad-hoc approach of discovering type variable bounds and so on. Anyway, congrats!

Generator templates, after some improvements may even be a separate project/framework for the annotation processing.
generatortemplates

@elucash elucash closed this as completed Oct 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant