4 ms·
> It seems you are blaming C++ as a language for the design of the libraries you are using. Precisely. In the same way that Java is criticized for proliferati
by Aeolos 11y ago
> It seems you are blaming C++ as a language for the design of the libraries you are using.
Precisely. In the same way that Java is criticized for proliferating the IAbstractFactoryVisitor design anti-pattern, C++ should be criticized for its weak standard library which causes an overproliferation of mutually-incompatible reimplementations of basic functionality.
As to whether this is or is not a performance issue depends on the specifics of the application and the underlying hardware.
This is besides the point to this discussion. Why don't C# libraries reimplement System.String like C++ libraries reimplement std::string? That's the real question here.
- pjmlp 11y agoBecause when C++ appeared, its standard library was basically C. Then you had the early adopters that were basically the same developers that were still writing C with lots of inline Assembly. So each developer, or team, had to write their own library, because they knew better. It took all the way up to ANSI C++ (1998) to finally have a proper minimal library. Minimal, because C++ needed to cater to the C mentality that the OS is the runtime. Then you had almost a decade until the C++ vendors were able to catch up the standard. Mind you that in the mid-90's there were still quite a few C compilers that were K&R only. This is why when Java appeared, many of us C++ devs that cared also about safety, jumped into it. As it provided a more portable experience.
- CyberDildonics 11y agoModern libraries don't reimplement std::string. The C++11-14 standard library is actually pretty solid.
- Aeolos 11y agoI was actually curious if this is true, and it appears that Unreal Engine 4 reimplements std::string (FString) [1] I think this qualifies as a modern library. My yardstick for "pretty solid" is actually meaningful Unicode support, so I will reserve judgement as to whether the C++11 STL qualifies. [1] https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/StringHandling/index.html https://docs.unrealengine.com/latest/INT/Programming/UnrealA...
- CyberDildonics 11y agoUnreal has been evolving for over 15 years and the engine does lots of preprocessing as well as being built for interactive C++, so I don't think it is the best example.