Skip to content

Replace ArrayMath/Util scripts with templates #86

@hamishmorgan

Description

@hamishmorgan

The code generation scripts genArrayMath.sh and genArrayUtil.sh are becoming unmanageable. In particular the resultant .java files need associated unit tests, but construction of these will be painful using the current system. Further, it is not fitting with the maven best practice to include generation scripts within the /src/main/java hierarchy.

There seems to be three major contenders in the Java templating for code generation field:

  • Velocity
    • Apache project.
    • Largest user-base, probably because of the previous point.
  • Freemarker
    • Alleged to be faster, not that I care about that for this use-case.
  • StringTemplate
    • MVC nazis, but possibly in a good way. Will require doing things properly or not at all.
    • Used by ANTLR parser generator, so obviously it copes well with source generation.

Over all there doesn't seem to be a huge amount of difference between these libraries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions