logoalt Hacker News

CoastalCodertoday at 11:31 AM1 replyview on HN

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.


Replies

direwolf20today at 12:28 PM

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.

show 1 reply