Re:Death by design patterns, or On the cognitive load of abs...
by LaLaLand122 on Monday May 29, 2023 @06:17PM
(#36118753)
I will never type this:
When I could do this:
[ Parent
| on HN ]
Re:Death by design patterns, or On the cognitive load of abs...
by khazhoux on Monday May 29, 2023 @06:43PM
(#36118985)
That's perfect -- as easy to write and to read as printf. I feel like an idiot for not using it all these years.
Edit: Oh, it's in C++23 standard. Only took them 38 years! ;-)
Re:Death by design patterns, or On the cognitive load of abs...
by peterashford on Tuesday May 30, 2023 @12:15AM
(#36121057)
Agreed with you on both counts - cout was an abomination and that std::println looks great (I'd never seen it before, either)
Re:Death by design patterns, or On the cognitive load of abs...
by LaLaLand122 on Tuesday May 30, 2023 @01:43AM
(#36121496)
I doubt it's yet implemented in any standard library. But it has been in the fmt namespace for close to a decade: https://fmt.dev/ . I do use it in a C++11-only codebase.