On Tue, 5 Jan 2021 23:22:03 +1100 Chris Angelico firstname.lastname@example.org wrote:
On Tue, Jan 5, 2021 at 9:38 PM Paul Sokolovsky email@example.com wrote:
There were good reasons to not have string interpolation in the core language for decades then - KABOOM - there's string interpolation. You see a pattern yet? No? Oh, let's just keep watching.
Do you have evidence from the language itself, or from the BDFL, that string interpolation was out of the question? If not, then that's why I'm not seeing the pattern or correlation.
Yes, most people came to Python from other languages like Perl and PHP, which had string interpolation "forever". Request for such in Python were also around forever, I remember them since 1.5.1, when I chose Python as my language of choice. Nothing could prevent them being implemented in 1.5.2, but they were rejected exactly as not fitting Python's model of "explicit is better than implicit" (i.e. if you want to format, do format, do abuse normally looking strings with formatting magicity) and "there's one way to do it" (Python has the way to format strings - % operator, use it). Then, suddenly...
My friend Chris, he's more interesting. He self-describes as "Python and [censored] tutor, [irrelevant] addict, and Pike fanatic." That Pike, I immediately recognize it. Remember that choosing-a-language-of-choice event described above, culminated with selecting Python as of 1.5.1? Well, Pike was among the contenders too. Glad to hear it's alive and well.
So, what can we tell to Chris? I guess "We're glad for you, that your braces needs are covered by Pike, but why are you so cruel to Python fanatics, who want braces right in Python? And just don't tell that braces from dict literals should be enough, we want more, we want one-liners with a bunch of if's and while's, we want multi-statement lambdas, we want it all."
I hope you found the fable enjoyable, and not devoid of some moral.