[ 
https://issues.apache.org/jira/browse/FREEMARKER-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17787620#comment-17787620
 ] 

Dániel Dékány commented on FREEMARKER-183:
------------------------------------------

I will dig into the some of the pending issues, like this, in December. For 
now, I don't remember the implementation details. But what I think we can do is 
adding a new interface, that tells that if you try to call the value (the 
{{TemplateModel}}), then instead of failing with {{For "...(...)" callee: 
Expected a method or function, but this has evaluated to [...]}}, it just 
returns the value that you attempted to call. Something like 
{{ComponentMethodTempalteModel}}, which is just a marker interface that extends 
{{TemplateModel}}. So, to answer your question, it absolutely horrible, but not 
_too_ horrible... After all, the template authors just experience that for some 
reason it works, and almost nobody sees the horrors behind.

> 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)

Reply via email to