On Thu, Jun 10, 2021 at 2:58 PM Ricky Teachey <ricky@teachey.org> wrote:
Something I don't understand is whether there is anything about this proposed feature that can't be accomplished with a simple function...

 
....
And use it like this:

 >>>  templify("Here, have some {foo}.")
 TemplateLiteral(template = " Here, have some {foo}.", tokens = (("Here, have some ", True), ("spam & eggs", False)))


What is it about this task that requires it being handled at the language level...?

 AIUI, that is hard to do without language support, because the function templify can't easily access the value of 'foo' because the binding only exists in the caller's scope.

So for a simple function to be used, you'd have to pass in the placeholder values explicitly as separate arguments, which somewhat defeats the point.

Steve