Re:What should go into the C++ standard library (2018)
by alexkcd on Wednesday February 27, 2019 @10:34PM
(#19268792)
Agreed. Even if 2d graphics somehow made sense for standardization, it's not the place to start. How about first standardizing a linear algebra library that defines 2d/n-d vectors & matrixes? It's a prerequisite for an ergonomic 2d graphics library. And even such a library, which arguably has way more utility being in a standard, you'd still be hard pressed to find an optimal design (just look at design tradeoffs between glm, Eigen, etc.).
Re:What should go into the C++ standard library (2018)
by pjmlp on Thursday February 28, 2019 @02:45AM
(#19269710)
Which is exactly what the authors are now pursuing.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p138...
Re:What should go into the C++ standard library (2018)
by mattnewport on Wednesday February 27, 2019 @10:43PM
(#19268828)
I wouldn't want to see json parsing in the C++ standard library. Sockets yes but not json. That is another domain better addressed with an improved package / dependency management story IMO.
Re:What should go into the C++ standard library (2018)
by ioquatix on Wednesday February 27, 2019 @11:54PM
(#19269026)
None of the things you mention really need to be in stdlib. There are plenty of awesome options, and the great thing is, they all have their own pros/cons and you can choose depending on your requirements.
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?
Re:What should go into the C++ standard library (2018)
by stochastic_monk on Thursday February 28, 2019 @06:25AM
(#19270594)
I don’t think C++’s “Pay for what you use” applies here. You don’t have to use something just because it’s in the standard library.
The only practical difference for a user is a larger binary when statically linking.
(The burden on compiler developers is a very real concern, however.)
Re:What should go into the C++ standard library (2018)
by Waterluvian on Thursday February 28, 2019 @06:16AM
(#19270553)
Can you help me understand your concern? I'm not a c++ person. Is it that there's more stuff that needs to be packaged in even if it's not being used?
Re:What should go into the C++ standard library (2018)
by epage on Wednesday February 27, 2019 @11:37PM
(#19268982)
iirc the graphics proposal has gone through several iterations, including a std::web_view [0]. Yes, putting a web browser in the 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...
Re:What should go into the C++ standard library (2018)
by tmyklebu on Wednesday February 27, 2019 @10:48PM
(#19268843)
> 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.
I think the BSD socket library is that standard approach...
Re:What should go into the C++ standard library (2018)
by th3l3mons on Thursday February 28, 2019 @10:26AM
(#19271936)
It's been a few years but the libraries needed for different OSs changes. The source and imports needed between Linux and Windows differs. Also comes with some other baggage, like I don't recall if Windows offers a Unix socket implementation.
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.