The String template API is about the processor, not the template
Remi Forax
forax at univ-mlv.fr
Fri Sep 15 16:27:07 UTC 2023
I know that I'm asking a lot, but I believe the way the String template JEP is written and the API is designed uses the wrong center.
This spec is not about the string template, it's about the template processor, the string template is just a parameter of the processor.
This was not true historically, StringTemplate was the design center.
But when we required the syntax to be always prefixed by a template processor, we have make the template processor the new design center.
Currently the API is designed with the processor interface defined as a member interface of StringTemplate.
I think we should go the other way around, the top level construct should be the interface TemplateProcessor and StringTemplate should be defined as a member of TemplateProcessor.
If you think about it, a lot of our users may use a TemplateProcessor but only few will either implement a template processor or use RAW, so knowning what a StringTemplate is a not something most of our users will have to learn.
regards,
Rémi
More information about the amber-spec-experts
mailing list