Remix.run Logo
▲ forrestthewoods an hour ago

No. The problem isn’t that std::regex is slow and badly designed. It’s that std::regex exists at all.

C++ is unique in that it defines a spec for STL but not implementation. The result is something that is both overspecified and underspecified.

Including batteries is fine. Including a spec for what the batteries should look like is such a profoundly bad idea that no other major language does it.

▲ameliaquining 24 minutes ago | parent [-]

I'm confused about what exactly you're arguing for. Is the idea that the standard library should be minimal and then each compiler should ship its own nonstandard "batteries" library?

▲forrestthewoods a minute ago | parent [-]

I think the language committee should provide a spec where required (OS filesystem, mutex, etc). And when it is not required they should simply provide a plain bog standard library.

There is absolutely no reason for std::deque to be a specification. The committee should either ship a committee library for std::deque or they should leave it to the community. They can provide a battery or they can not. Providing a spec for a battery that is both over and under specified is the absolute worst possible choice.