Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm going to make an asinine prediction. We will be exploring F-strings in future languages in 100 years time, encountering the same problems and questions.

I still use printf semantics in Python3 despite trying to get with the program for symbolic string/template logic. I don't need to be told it's better, I need some Philip-K-Dick level brain re-wiring not to reach for

  "%d things I hate about f-strings\n" % (int(many())) 
modes of thinking.


FYI that code sample is broken, it should be `(int(many()),)`

Ironic I guess?


It's not broken (try it!). Any value is interpreted as an implicit 1-tuple if it's not a tuple nor a dict. A better example would have been `"..." % many()` where `many` returns a tuple or dict.


Bless compilers able to catch wrong format specifiers.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: