5 ms·
Yes and yes! So, the C++ standard library differences don't usually bite you unless you're e.g. Building executables on windows with mingw and trying to link ag
by alexberghage 13y ago
Yes and yes! So, the C++ standard library differences don't usually bite you unless you're e.g. Building executables on windows with mingw and trying to link against libraries built with visual studio that use STL features at the API, but there are indeed several implementations out there. libstdc++, libc++, and msvcrt are among the more common.
As for other languages with several standard libraries: a while ago that was a frequent criticism of D -- there were two competing standard libraries, which caused some division in the community.
- speeder 13y agoD was another issue entirely. It had a standard library, and a non-standard library that was more popular than the standard one, and they were not compatible at all. The reason it caused the division at community is that the ones that you could not use both on the same project, this meant that for a while you had two "D" languages that were separate, libraries made with one did not worked with the other...
- xavel 13y agoOh man, and I'm glad they finally settled for Phobos. I don't use D much, but thanks to gdc, the gcc frontend to dmd, and Phobos, writing D actually became acceptable, almost enjoyable. There's, of course, still the fact that D is not very widely used.
- synchronise 13y agoHas this issue with D been fixed, or do users still have to choose between two incompatible libraries?
- qznc 13y agoFixed with D2. Although, not all of Tango (the non-standard one) is available in D2/Phobos already. For example, Phobos has XML [2,3] stuff, but Tango's is supposed to be better [0]. Port is ongoing [1]. [0] http://dotnot.org/blog/archives/2008/03/12/why-is-dtango-so-fast-at-parsing-xml/ http://dotnot.org/blog/archives/2008/03/12/why-is-dtango-so-... [1] https://github.com/SiegeLord/Tango-D2 https://github.com/SiegeLord/Tango-D2 [2] http://dlang.org/phobos/std_xml.html http://dlang.org/phobos/std_xml.html [3] http://forum.dlang.org/thread/igmfgrfwzeqpwafeilfi@forum.dlang.org http://forum.dlang.org/thread/igmfgrfwzeqpwafeilfi@forum.dla...
- ArbitraryLimits 13y agoIt seems like C++'s lack of an ABI would bite you way before any issues with libc++. (Or is there one now? I'm getting old.)
- plorkyeran 13y agoIn practice all of the compilers have arrived at a common ABI for each platform.
- deleted 13y ago[deleted]
- HNLogInShit 13y agoWow, so we could now truly have "off-the-shelf" objects, which was going to be the future of software development in the '90s but never materialized?
- bstamour 13y agoTechnically C doesn't have a standard ABI either. Compilers just tend to use similar symbol names.
- pjmlp 13y agoTrue, what many perceive as the C ABI is actually the OS ABI. As most OSs tend to be written mostly in C, it is natural that C ABI == OS ABI. In the few cases where the OS was written in other languages, like the mainframe systems, the early 80's OS done in Pascal dialects (Mac OS), Modula-2 (Lillith), Assembly (MS-DOS/CP-M) and many others to list here, there was no C ABI to speak of.
- apaprocki 13y agoThat isn't true. IBM and Oracle's compiler do not share a compatible ABI with g++ or clang. Oracle is adopting the common ABI in Studio 13 and that's a pretty big deal.
- binarycrusader 13y ago