4 ms·
I've unfortunately been dragged into some of the conversations around the proposed 2D graphics library (despite trying to avoid them), and the proposal is awful
by pcwalton 8y ago
I've unfortunately been dragged into some of the conversations around the proposed 2D graphics library (despite trying to avoid them), and the proposal is awful. It's a mid-'90s vector graphics proposal that is inadequate for fast GPU-accelerated rendering. A modern library that aimed to be actually used in the industry would probably look more like WebRender (though WebRender's API is admittedly a bit of a mess, the principles are sound). There is no way that browsers or PDF readers or Illustrator or Toon Boom Harmony or whoever else does vector graphics in industry would ever use the C++ proposal.
When I brought this up, the proponents of the library dug in their heels and said that it's not intended for apps like Flash, PDF readers, and browsers, but rather intended for (a) teaching and (b) for companies that have prohibitions on using third-party code. The teaching use case (a) is unconvincing, because while Logo was indeed a good teaching tool and it'd be great to resurrect it, there's no need to do so in the standard library. As far as I could tell, the real reason was (b) for the proponents of the spec, and, needless to say, that's a horrible reason to put something in the standard library. It's effectively an attempt to route around some random dysfunctional company policy by saddling everyone with a burden for all time.
- kevin_thibedeau 8y agoThe 2D effort is a complete waste of time. If they plan to include font support it will be a total nightmare. Anyone that needs graphics rendering can choose from a mature range of libraries that best suits their needs. There is zero need for something like that in the standard lib. They should learn from the example of Python where first class libraries are intentionally left out of the standard lib so that they don't fossilize. That being said. I'd like to see libAgg get more support as it's somewhat drifting in the wind and it has a nicely designed composable rendering pipeline that aligns well with C++ principles.
- AstralStorm 8y agoIf they want to steal an API, SDL exists and can be modernized. Again, no need for this in standard library when there are reasonable libraries with good licenses around. Agg is weak in comparison, though it has a few cute things going for it.
- deleted 8y ago[deleted]
- pjmlp 8y agoI am on the other side of the fence. First because I have found memories for Borland's BGI and there is hardly something like that for C and C++ that works easily everywhere. Secondly, because the attacks against the graphics proposal, could be equally used against iostreams, filesystem or networking. Not every platform where C++ runs can support them, none of them fully supports modern OS features and all of them have better third party alternatives. Yet for some magic reason it is ok for them to be part of the standard library, while graphics are not allowed to.
- dblohm7 8y agoI strongly agree that networking should not be in there either.
- AstralStorm 8y agoIt's already there in POSIX C. (Winsocks is almost compatible.) The C++ basic version actually would be good to have. Potentially a basic threaded version too. Unlike graphics which is a moving target, even 2D. Where do you stop? Bezier paths with subdivision and full blended gradient support for those? Nonlinear projections? Fonts? Text composition? If you bite off too much, you end up with the OpenGL problem where nobody implemented everything. The example of a pretty bad implementation of 2D would be a) Cairo b) whatever Android and Chrome uses for drawing.
- pjmlp 8y agoPOSIX C doesn't do HTTP/S, asynchronous networking, and isn't available in all platforms supported by C++ compilers. Should it handle SSL, TLS, http routing, HTML templates,.... Where do you stop CSS, JS bundlers?
- coldtea 8y ago>The example of a pretty bad implementation of 2D would be a) Cairo b) whatever Android and Chrome uses for drawing. And why, pray tell, are those "pretty bad"?
- geezerjay 8y agoHas nothing been learned from the current package/module ecosystems that were built around modern programming languages? I mean, has boost taught nothing?