Hacker News new | ask | show | jobs
by CoastalCoder 106 days ago
I'm pretty late to this discussion, but...

I was somewhat horrified to discover that the STL ended up with a special role in the language spec. (IIRC, one of the tie-ins is initializer lists.)

IMHO it's far wiser to leave the standard library as something that isn't needed by the core language, and where users can (at least in principle) provide their own alternative implementation without needing compiler hacks.

I.e., those details are inherent in the definition of "library" in the C/C++ world.

3 comments

Which languages have a standard library that contains nothing requiring intimate integration with the language implementation itself? I'm not aware of any, even limited-standard-library C included.
> I was somewhat horrified to discover that the STL ended up with a special role in the language spec. (IIRC, one of the tie-ins is initializer lists.)

std::type_info? std::is_trivially_...?

Parts of the language being in the std namespace isn't really a problem. An implementation is free to treat initializer lists as a built-in type.
Is there an implementation that does that?
With std::nullptr_t on MSVC, it's always there without any includes.