[
https://issues.apache.org/jira/browse/FREEMARKER-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17785168#comment-17785168
]
Dániel Dékány commented on FREEMARKER-183:
------------------------------------------
Yeah, it's dirty. But I just realized that the hard practical issue with 3 is
that you then *must* not write out the `()`, and people will be constantly
confused about that, because most just copies what's done in Java (I expect
that because in most SO questions they use {{obj.getFoo()}} in templates, not
realizing that {{obj.foo}} is possible). In some languages the just make the
the compromise where {{()}} is optional (and that leads to messy source files,
because, obviously, people will use both forms randomly, especially in a team).
Unfortunately, without having a separate method namespace, that's not feasible
for us. Well, what can I say... the owners of the Java language has made a big
mess out of it, for every other language, but especially for FreeMarker.
> Add support for Java records
> ----------------------------
>
> Key: FREEMARKER-183
> URL: https://issues.apache.org/jira/browse/FREEMARKER-183
> Project: Apache Freemarker
> Issue Type: Task
> Reporter: Dániel Dékány
> Assignee: Dániel Dékány
> Priority: Major
>
> Currently we don't support records (JEP 395), which was finalized in Java 16.
> Users can extend {{DefaultObjectWrapper}} for that of course, but it should
> be supported out of the box.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)