It's actually one of the most powerful enhancements one can make to a programming language
It's actually one of the most powerful enhancements one can make to a programming language
Posted Jan 24, 2025 14:00 UTC (Fri) by rrolls (subscriber, #151126)In reply to: -_- by LtWorf
Parent article: A revamped Python string-formatting proposal
My reply to siddh above should explain this, since without being able to build interpolations natively within the syntax of a language (which is what t-strings will do for Python), any "perfectly good templating library" is ultimately just a particularly complex string formatting technique, so it'll fall foul of the same problems once your use case gets sufficiently complex itself.
t-strings is far more than "developers finding something to keep busy" - I would put it in the same category of powerful, fundamental enhancement as Ruby/PHP fibers (which are more powerful than Python's asyncio - I wish we had fibers in Python).
It's a shame that t-strings seem to be so easy to misunderstand as "just more syntactic sugar for str.format" because saying that that is selling them short is a severe understatement.
