And the Five Winners for the “C++20 STL Cookbook” are
Today, I want to present the five winners for the pdf of the book “C++20 STL Cookbook” by Bill Weinman.
To get the book, you had to answer the following question by Bill Weinmann: “What are the major advantages of the C++20 format library over printf and iostream?“. Here are the best five answers. Two answers were almost literally identical, but I had to decide for one of them.
Manali
Uzoochogu
Gabriel
Disadvantages:
– not Type safe
– it is not extensible because it only supports a specific number of types.
Advantages:
– Type safe
– now extensible ( yay :D )
– readable
– easier to localize/translate
Roberto
Modernes C++ Mentoring
Do you want to stay informed: Subscribe.
Hyper
my answer is that the C++20 format library provides a rich set of formatting options that exceeds even that of prinf. It provides a positional arguments and is extensible to support more values and classes. It is like it was isnpired by Python str.format method.
the C++20 format() function is a variadic template function which provides type safety, along with the performance and efficiency advantages of iostream. the format library also provides vformat(), a type-erased interface that prevents generating multiple instances of complex template function for each combination of arguments.
the make_formate_arge() function creates a type-erased parameter stack to pass to vformat(), which does the heavy lifting of formatting the string. This is how the format() library operates so efficiently.
Thanks a lot to my Patreon Supporters: Matt Braun, Roman Postanciuc, Tobias Zindl, G Prvulovic, Reinhold Dröge, Abernitzke, Frank Grimm, Sakib, Broeserl, António Pina, Sergey Agafyin, Андрей Бурмистров, Jake, GS, Lawton Shoemake, Jozo Leko, John Breland, Venkat Nandam, Jose Francisco, Douglas Tinkham, Kuchlong Kuchlong, Robert Blanch, Truels Wissneth, Mario Luoni, Friedrich Huber, lennonli, Pramod Tikare Muralidhara, Peter Ware, Daniel Hufschläger, Alessandro Pezzato, Bob Perry, Satish Vangipuram, Andi Ireland, Richard Ohnemus, Michael Dunsky, Leo Goodstadt, John Wiederhirn, Yacob Cohen-Arazi, Florian Tischler, Robin Furness, Michael Young, Holger Detering, Bernd Mühlhaus, Stephen Kelley, Kyle Dean, Tusar Palauri, Juan Dent, George Liao, Daniel Ceperley, Jon T Hess, Stephen Totten, Wolfgang Fütterer, Matthias Grün, Phillip Diekmann, Ben Atakora, Ann Shatoff, Rob North, Bhavith C Achar, Marco Parri Empoli, Philipp Lenk, Charles-Jianye Chen, Keith Jeffery, Matt Godbolt, and Honey Sukesan.
Thanks, in particular, to Jon Hess, Lakshman, Christian Wittenhorst, Sherhy Pyton, Dendi Suhubdy, Sudhakar Belagurusamy, Richard Sargeant, Rusty Fleming, John Nebel, Mipko, Alicja Kaminska, Slavko Radman, and David Poole.
My special thanks to Embarcadero | |
My special thanks to PVS-Studio | |
My special thanks to Tipi.build | |
My special thanks to Take Up Code | |
My special thanks to SHAVEDYAKS |
Modernes C++ GmbH
Modernes C++ Mentoring (English)
Rainer Grimm
Yalovastraße 20
72108 Rottenburg
Mail: schulung@ModernesCpp.de
Mentoring: www.ModernesCpp.org
Modernes C++ Mentoring,
Leave a Reply
Want to join the discussion?Feel free to contribute!