by borland · 7y ago · 0 comments
IMHO, something should be in the standard library if a large class of programs would want to use it, and if a "lowest common denominator" approach would be good enough for the majority of those
Example: JSON parsing and generation should be IN. A tremendous number of programs want to produce and consume JSON, and the bulk of these are not performance critical and don't have too many edge cases. Just boring normal JSON.
Example: Sockets should be IN. As above, vast numbers of programs want to use sockets and a standard approach would suit almost all of them perfectly well.
Example: Graphics should be OUT. A lot of programs could potentially use a graphics library, but many of these would not be satisfied by a "standard" approach. Cross platform is the main thing - having to interface with GDI, SDL, Quartz, and whatever else, and doing a bad job of all of that.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p138...
The point of C++ is to avoid burdening you with costs you don't want to incur. Putting this stuff in stdlib is exactly that.
If you could focus on modules and package management that didn't suck, would you still argue that you need to have JSON and high level sockets in stdlib?
I think I saw passing reference in a recent trip report that for now they are only focusing on math primitives [1].
[0] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p110... See also https://www.reddit.com/r/cpp/comments/900dor/stdweb_view_pro...
[1] https://www.reddit.com/r/cpp/comments/au0c4x/201902_kona_iso...
I think the BSD socket library is that standard approach...