3 ms·
String formatting is indeed a mess, but that's a hind sight thing. Swift has a super nice system precisely because they are new and looked carefully at everyone
by boxed 6y ago
String formatting is indeed a mess, but that's a hind sight thing. Swift has a super nice system precisely because they are new and looked carefully at everyone else (I'm looking at you D who added string interpolation after swift but in a way that has all the problems of python).
But make no mistake: f-strings are NOT the same as .format()! One is compile time, the other is runtime. You can't localize f-strings.