On Sep 17, 2021, at 3:49 AM, Tagir Valeev <amae...@gmail.com<mailto:amae...@gmail.com>> wrote:
Another alternative is to have a single list of template fragments, something like this: Probably the VM will prefer to see a single string. There are lots of unused Unicode points that can serve as segment markers. This of course only directly affects the translation strategy, not the user-visible APIs, except the lowest level BSM components. Condy can make up any representational differences to List<String> or something more exotic. Also, languages like Scala which want to add modifiers to interpolation points, like \{PI}%.3f, can share add their own parsing logic to the single long string, just as easily (or more easily) as to a list of strings to be individually parsed. Basically, if it’s just one long string, then you take your domain-specific parser and make sure it properly lexes the “object replacement marker” provided by unicode, as well as whatever string structure you also want.