News for hackers. Stuff that matters.
Re:You can't make C++ not ugly, but you can't not try (2010) by pjmlp on Thursday February 27, 2020 @02:49AM (#22431475)
Because STL is part of the compiler, guaranteed to work on every platform supported by the compiler, and does not require lots of paperwork for adoption at many shops.
Re:You can't make C++ not ugly, but you can't not try (2010) by kllrnohj on Thursday February 27, 2020 @02:57AM (#22431504)
> Because STL is part of the compiler, guaranteed to work on every platform supported by the compiler

No it isn't and no it's not. There are even platforms where an STL isn't even provided out of the box, you have to pick one. And there's quite a few at that - libc++, libstdc++, stlport, etc...

But clang, g++, etc... they don't care. To them it's just another library you're linking against, no different from any other dependency. They don't provide it, they don't care. It can even be quite a pain in the ass to use the "native" STL of a given compiler, like trying to use libc++ with Clang on most Linux distros.

Re:You can't make C++ not ugly, but you can't not try (2010) by pjmlp on Thursday February 27, 2020 @03:52AM (#22431736)
Only ISO C++ compliant platforms matter.

As having multiple implementations to choose from, that is the beauty of language standards.

Abseil and boost do not fall under that umbrella, and I belong to the C++ subculture that never ever touched them, or plans to.

Re:You can't make C++ not ugly, but you can't not try (2010) by cmroanirgo on Thursday February 27, 2020 @04:33AM (#22431898)
STL by it's very name is a library, and because it ships with a compiler, doesn't mean it's part of that compiler. It's just a library, like Boost. It might have some ISO standards behind it: great! But it's still a library and not intrinsic to the language itself (see my orig question).

eg. to use an 'int' you just declare one and use it. To use strings, you need to include <string.h>.

Re:You can't make C++ not ugly, but you can't not try (2010) by gpderetta on Thursday February 27, 2020 @05:09AM (#22432046)
STL (if we use this name as a arguably incorrect alias for the c++ standard library) is intrinsically linked with the language. A lot of its implementation requires primitives that are not part of the language (although often exposed as intrinsics as an extension). An implementation can and often does treat the names under namespace std specially and assumes invariants and behavior.
Re:You can't make C++ not ugly, but you can't not try (2010) by pjmlp on Thursday February 27, 2020 @05:05AM (#22432031)
The S in STL stands for Standard, something that neither boost nor Abseil are, or will ever be.
Re:You can't make C++ not ugly, but you can't not try (2010) by kllrnohj on Thursday February 27, 2020 @04:19PM (#22438025)
Being in the standard doesn't mean they are good or should be used.

java.util.Vector is standard as well but you'd be laughed out of a code review if you tried to use it anywhere. Similarly std::auto_ptr is in the standard, and is universally agreed to be trash to avoid like the plague. So much so it was (eventually) removed. The container section of the library has just sadly not had the same deprecation & removal of bad code put into it.

The claim was "STL containers are the sane default" not that "STL containers are more available". I stand by that claim being wrong. You have so far not actually attempted to counter it on any technical grounds, just bad appeal to authority fallacies.

Re:You can't make C++ not ugly, but you can't not try (2010) by pjmlp on Thursday February 27, 2020 @04:38PM (#22438230)
Except that java.util.Vector is for backwards compatibility and everyone should use java.util.ArrayList instead.

Likewise std::auto_ptr got replaced by std::unique_ptr.

As you see the standard library keeps the knowledgable developers covered, no need to look elsewhere.

You are indeed wrong.

Re:You can't make C++ not ugly, but you can't not try (2010) by de_watcher on Thursday February 27, 2020 @06:20AM (#22432336)
You're a troll from 2003. I remember huge forum threads about STL.

Now it's the Standard Library like in any other language.

[dead]
Re:You can't make C++ not ugly, but you can't not try (2010) by kllrnohj on Thursday February 27, 2020 @12:18PM (#22435335)
Uh, what? Here's a simple example, clang supports windows. Clang's "bundled" standard library, libc++, doesn't support windows. Clang also not only allows but is commonly used with libstd++ instead.

Mixing and matching compilers and standard libraries is not only possible it's common. Especially when cross-compiling enters the picture.

There is no bundling of any kind in any concept of that word, practically or technically, between C++ compilers and standard libraries. This is also a good thing, it makes porting C++ to new platforms far more easier than it otherwise would be.

They even have independent feature compliance sections. Clang & G++ both support new C++ features independently of whether or not their "bundled" standard library does yet.

[dead]
Re:You can't make C++ not ugly, but you can't not try (2010) by kllrnohj on Friday February 28, 2020 @03:44PM (#22446170)
> You're an awful troll.

Chill on the name calling.

> Clang on Windows is distributed to use the system installation of libstdc++

Windows doesn't have a default system installation of C++ at all nor is it libstdc++. You can use clang on windows with libstdc++, but that's a MingW port and not at all "native" to the platform.

Windows' standard C++ runtime is the Visual C++ Redistributable and there are many versions of it that all coexist simultaneously. Which one is used depends on what the application was compiled against, there is no "system version" of it. Runtimes that Clang can also use.

> That's because libc++ is clang's experimental implementation of the C++ standard library

There is nothing experimental about libc++ at all. It is the standard for some platforms, like Android and MacOS/iOS. In fact Apple removed support for using libstdc++ entirely with Xcode 10. And before Xcode 10 you got a choice between libstdc++ & libc++, because again the C++ standard library is not bundled. Similarly on Android there used to be a choice between not just libstdc++ and libc++ but also stlport was an option. Now only libc++ is supported, and it's not provided by the system at all.