Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Lambdas #5

Open
EdwarDDay opened this issue Nov 16, 2024 · 1 comment
Open

Support Lambdas #5

EdwarDDay opened this issue Nov 16, 2024 · 1 comment

Comments

@EdwarDDay
Copy link

Hey, nice work. I want to know, if you also plan to support lambdas and maybe other optional features of the mustache specification.

@L-Briand
Copy link
Owner

Hello ! Thank you for the nice words.

Since the birth of my first child, I have less time to update my repos..

Adding lambdas would certainly be a nice addition. I do not know of a way to execute bits of kotlin at runtime without pre-compiling it. It would probably require a tool to extract lambdas and create some sort of kotlin classes containing the code before compilation. Then, this tool can be included in the final project with a gradle plugin.

Unfortunately, this is too complicated at the moment for me to do it. It's still possible to create kotlin lambdas directly when building the context, but it breaks the flow and is not directly inside the template. I know its not the optimal solution.

Concerning inheritance and dynamic names, these do not requires this kind of pre-processing logic so it might be more easy to do them. I will take a look when I got time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants