That f-strings were "static" was by far my biggest criticism of it, given how useful I find JS's template strings.
And this proposal seems like a straight up better version of template strings:
- the static strings and interpolations are not split and don't have to be awkwardly re-interpsersed which I've never found 100% trouble and 0% utility
- the lazy evaluation means it can be used for things like logging (which really want lazy evaluation), or meta-programmation (because you can introspect the callables, and you get the expression text)
Could you elaborate? I would find it rather surprising if my log messages don't contain the data at the very moment I invoke the logger.
In most APIs this requires an explicit conditional check and the average developer will not think of it. This allows said check to be performed internally.
It's such a subtle difference that I only notice it when my IDE underlines it :/