logoalt Hacker News

Krutonium • today at 3:59 AM • 4 replies • view on HN

Maybe a slightly faster std::regex or whatever it's called; apparently it's horrendously slow for no benefit.


Replies

ameliaquining • today at 4:45 AM

The primary reason this hasn't happened is that it'd break C++'s de facto stable ABI (even though officially there's no such thing). For a lot more context, see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p20... and https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p18....

Spoiler alert: The option described as "the sort of leadership failing that I pray we can avoid" is what ended up happening.

➕ show 1 reply
failbuffer • today at 5:26 AM

As an avid non-C++ programmer, can I suggest doing something about the build/module system? I shouldn't have to learn a separate language (CMake) and figure out the right include files to pull in a library.

I mean, I mainly say this to joke because it's probably unfixable at this point, but whenever I mess with it, I'm struck by how hard/opaque C++ makes this problem compared to most other languages.

➕ show 3 replies
stingraycharles • today at 4:03 AM

Ranges need work as well, there’s lot of opportunity to improve things there.

forrestthewoods • today at 5:40 AM

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.

➕ show 1 reply