A quest for safe text formatting API
zverovich.net
zverovich.net
[0]: https://zgcoder.net/ramblings/typesafe-printf/ [1]: https://fstarlang.github.io/general/2017/11/23/sprintfstar.h...
Seems like that section could use more examples. A fair amount of dynamic languages won't bomb if you try to format a string as a number with their s/printf equivalent. They coerce the string into a number, with sometimes unexpected (though documented) results. Perl, PHP, and awk all do this.
Aren't these enough? Apparently no.
There could be a world where people stick with this kind of "pragmatic" solution and stay away from without doing spec-puzzle-solving. C++ is not that world and I've accepted that, but let's make sure the other side holds the majority vote.
There are plenty of esoterically templates shenanigans in C++ but this isn't one of them.
https://www.stackage.org/haddock/lts-18.0/base-4.14.1.0/Text...