3 ms·
I like the idea, but I think this kind of thing feels obtuse in languages like C# and Java where the "templates" are 100% written with the hosted language. Som
by haimez 10y ago
I like the idea, but I think this kind of thing feels obtuse in languages like C# and Java where the "templates" are 100% written with the hosted language.
Some languages can work around this by having flexible type definitions and syntax to make the DSL much closer to the target template (for an example, see: http://www.lihaoyi.com/scalatags/ http://www.lihaoyi.com/scalatags/). This works pretty well to avoid all those field declaration and "new" keywords.
- wtetzner 10y ago> I like the idea, but I think this kind of thing feels obtuse in languages like C# and Java where the "templates" are 100% written with the hosted language. I agree, but it's not that bad. I do think j2html [1] has a cleaner look than Aramid. [1] http://j2html.com/ http://j2html.com/