If you are making a new language, the easy way to fix this is make formatting a property of your strings, not a runtime function. Ie. instead of having "foo {bar}".format(bar=bar), have "foo {bar}" be equivalent to "foo "+bar.
This sidesteps the problem because only literal strings are formatted.
This sidesteps the problem because only literal strings are formatted.