4 ms·
printf Man, when I first read about it I was like “whaaaaa???” A little interpreted language in my print statements? That’s crazy talk! Now it’s like ... e
by YesThatTom2 6y ago
printf
Man, when I first read about it I was like “whaaaaa???” A little interpreted language in my print statements? That’s crazy talk!
Now it’s like ... everywhere!
- emerged 6y agoI feel it’s worth giving credit to Python f-strings in that case. They blew my mind in terms of convenience vs printf.
- danfang 6y agoIn addition to Python format strings: Javascript template strings: `I am ${variable.foo} ${variable.bar}.` - Life changing!
- Nightshaxx 6y agoPython has a few cool things like that. List comprehension blows my mind at how elegant it is.
- abdusco 6y agoAgreed. Same with dict, set and generator comprehensions. I wish more languages included that feature.
- asattarmd 6y agoWhat year did reaction happen? I spent my entire life taking it for granted, not realizing that it indeed is a little interpreted language in print statements.
- chx 6y agoFor many of us it was in 2015 when Control-Flow Bending: On the Effectiveness of Control-Flow Integrity was presented at USENIX proving printf is turing complete. https://github.com/carlini/printf-tac-toe https://github.com/carlini/printf-tac-toe https://www.usenix.org/conference/usenixsecurity15/technical-sessions/presentation/carlini https://www.usenix.org/conference/usenixsecurity15/technical...
- tonymet 6y agoWait til you try scanf