FM3 is not ideal if someone looks for some isolated feature to solve. FM2
has a lot of things to solve though, and that at least goes into
release for sure.

Currently, I think the next logical step in FM3 is replacing the whole
parser, and the way directives and built-ins are created during that, to
support a more regular, and more modular approach. One that could even
allow custom dialects. Custom dialects means that you can add directives
and built-ins on configuration time (so without patching and rebuilding
FreeMarker). So you could provide a set of directives and built-in
functions, give it a dialect name, and add that to the Configuration. And
then the dialect is used during template parsing (not just when the
templates are running). And also IDE plugins should be able handle such a
dialect. That's how regular and declarative this should be. I think this
kind of feature is important for a template language like FreeMarker, which
is a bit like being used as a DSL (that's often defined as a bunch of
imported macros, in the case of 2.x). But other than a fancy feature, it
would enforce proper engineering of the parsing related things. Also, the
current language is quite complicated to write parsers for (like for syntax
highlighting, auto-completion, etc.), as it's backed by a monolithic JavaCC
parser with lots of ad-hoc rules bolted on in Java. So we need to get rid
of that anyway.

I also wanted to modify the syntax quite much, because the current one is
just too alien for people used to Java and JavaScript mostly. Since it's
just a template language, most users won't invest much energy into
understanding the unusual ideas in it. They pretty much just look at
existing tempaltes, and try to guess the meaning of things. We are bad in
that scenario. But until I see that I or someone else has at least a
proof-of-concept to demonstrate the first, I won't waste anyone's time on
discussing this part.


On Wed, Jan 31, 2024 at 9:41 AM Taher Alkhateeb <ta...@pythys.com.invalid>
wrote:

>
> Hi Daniel, I read the wiki article, thank you for sharing. I noticed quite
> a few items not yet done, and I'm not sure if we have a unit testing
> implemented for all the changes?
>
> Anyway, would it be reasonable to say that maybe it's not recommend to
> work on V3 due to the implementation complexity or lack of clear future
> direction or that you're not done with the major work? Or do you think it's
> worth taking a stab at it? I'm interested in working on it mostly as an
> educational exercise and to sustain a project that I care about into the
> future rather than a having a specific goal.
>
> On Wednesday, January 31, 2024 11:19 +03, Daniel Dekany <
> daniel.dek...@gmail.com> wrote:
>  The information available is linked from
> https://github.com/apache/freemarker/blob/3/README.md
>
> What's happening with it: Nowadays, almost nothing. It's a huge effort to
> rewrite so many things. I guess that would be like a year full time job for
> me. (And that only if we are efficient with decision making, and not go
> back-and-forth a lot on every decision, committee style. Because there are
> way too many things that I think weren't good decisions in the past. Like
> even very core things like ObjectWrapper-s, I wouldn't repeat them in a new
> engine.) So the whole FM3 effort is unlikely to ever yield a release, but
> then, I see no more likely way to get away from 2.x heritage. It's just
> prohibitively expensive or impossible to get lots of things right in 2.x
> after 20 years, as it would either break backward compatibility a lot, or
> the resulting code would be too twisted to maintain. So 2.x is maintained,
> slowly still gets features that are feasible to add to it, and regardless,
> 3 either will happen, or not.
>
> On Sun, Jan 28, 2024 at 7:32 PM Taher Alkhateeb <ta...@pythys.com.invalid>
> wrote:
>
> >
> > Hello Everyone,
> >
> > So I'm trying to contribute or help with version 3, but it's been a while
> > and I'm not sure what's in the backlog. Do we have references to what's
> > happening in version 3? Jira issues don't seem to be differentiating
> > between the versions, and I couldn't find a roadmap or plan in the
> website.
> > I would like to try and for example create a test template and generate
> it
> > and from there work my way through bugs and issues. However I'm not sure
> > what to test for given that I'm not sure what feature set is different
> > between the versions. For that matter do we have any comprehensive
> > templates that we can use for testing without writing everything from
> > scratch?
> >
> > Any pointers are appreciated!
> >
> > Cheers,
> >
> > Taher Alkhateeb
> >
>
>
> --
> Best regards,
> Daniel Dekany
>


-- 
Best regards,
Daniel Dekany

Reply via email to