"Structural pattern matching" for Python, part 1
"Structural pattern matching" for Python, part 1
Posted Aug 7, 2020 11:56 UTC (Fri) by flussence (guest, #85566)In reply to: "Structural pattern matching" for Python, part 1 by mb
Parent article: "Structural pattern matching" for Python, part 1
> Literally dozens of major good features have been integrated in the past 15 years.
> One of the most recent ones being f-strings, for example.
> One of the most recent ones being f-strings, for example.
Look up Perl's format() function. You won't find many uses of that in modern code, because the community collectively realised some time in the 20th century that making people carry the cognitive load of a loquacious bespoke sublanguage that duplicates half of printf (and then doesn't even fix strftime) is absolutely bananas.
And f-strings are explicitly runtime-evaluated. You don't even get constant-folding!
