Hi everybody!
I just posted an announcement on the blog about the "new" Congo Template Engine project. I put the word "new" in scare quotes because it's not really a new project. It's just the rebranding of FreeMarker (the version under my control) under a new name.
One consequence of this was that I had to decide what the base JDK level that would be required was going to be and I figured it would be JDK 17. (The main alternative would be JDK 21 since that is also an LTS (long-term support) release). But I figured I'd be conservative for now and only require a version that has been out for going on 4 years.)
Now, what this means is that running the CongoCC tool itself (most recent build anyway) does require JDK >=17 because of the Congo Templates dependency. However, as of now, the tool does not generate any code that requires JDK >8. BUT... I think the new policy will be that the templates can use any constructs up through JDK 17, so we can assume that, at some point fairly soon, the code generated will also require JDK >= 17.
Now, I am quite interested in feedback/discussion from people who would be interested in using the templating component on its own regarding what features they would like to see. As things stand, I have been fairly aggressively cutting out existing bloat. I got rid of all the date/time related stuff because I intend to replace it all using the newer datetime API (that is not that new, since it was brought in in JDK 8). I got rid of all the declarative processing stuff (mostly designed for processing XML) and the #visit/#recurse/#fallback
directives.
One thing that I am thinking about simply getting rid of is that C-style #switch/#case
stuff that was in FreeMarker 1.x (before I was involved and rewrote the thing.) I always hated that switch-case with fall-through anyway, and in particular, I don't think such a tricky, confusing construct should be in a template language. I did a quick search on all the templates in CongoCC and there is no occurrence of #switch/#case
in there. I myself never use it! I only use #if/#elseif/#else
. I could, however, envisage putting in a more sensible #switch/#case
directive that does not have that annoying fall-through semantics.
Generally speaking, I have decided not to worry that much about backward compatibility with legacy FreeMarker, especially the widely used nothingburger project on ASF. Now, there was a possibility of significant migration of the user base, that would be one thing, but all of my experience of the last few years suggests that there is not. Or, in other words, Congo template engine is a new template engine. So I may well just get rid of support for #assign/#local
directives and say you have to use the newer #set/#var
.
But anyway, if anybody has any thoughts about this, including the move to JDK 17 as the base required Java level, please go right ahead. That's why I wrote this!