▲ | throwawayffffas 9 days ago | ||||||||||||||||
So we are well on our way to turning python to PHP. Edit: Sorry I was snarky, its late here. I already didn't like f-strings and t-strings just add complexity to the language to fix a problem introduced by f-strings. We really don't need more syntax for string interpolation, in my opinion string.format is the optimal. I could even live with % just because the syntax has been around for so long. I'd rather the language team focus on more substantive stuff. | |||||||||||||||||
▲ | turtledragonfly 9 days ago | parent | next [-] | ||||||||||||||||
> turning python to PHP. Why stop there? Go full Perl (: I think Python needs more quoting operators, too. Maybe qq{} qq() q// ... [I say this as someone who actually likes Perl and chuckles from afar at such Python developments. May you get there one day!] | |||||||||||||||||
| |||||||||||||||||
▲ | mardifoufs 8 days ago | parent | prev | next [-] | ||||||||||||||||
What's the issue with f-strings? I'm wondering because I thought they basically had no downside versus using the older alternatives. I use them so often that they are very substantive to me. If anything, this is exactly what python should be focusing on, there really isn't a lot more that they can do considering the design, expectations, and usage of python. | |||||||||||||||||
| |||||||||||||||||
▲ | nhumrich 9 days ago | parent | prev | next [-] | ||||||||||||||||
Pretty sure PHP does not have this feature. Can you give me an example? | |||||||||||||||||
| |||||||||||||||||
▲ | slightwinder 8 days ago | parent | prev [-] | ||||||||||||||||
string.format and string substitution are bloat and annoying to use, while f-strings makes it very easy to improve readability. So in the end, they remove big complexity in usage, by adding very little and straightforward complexity in syntax. |