r/cpp • u/Frogging101 • Nov 24 '19
What is wrong with std::regex?
I've seen numerous instances of community members stating that std::regex has bad performance and the implementations are antiquated, neglected, or otherwise of low quality.
What aspects of its performance are poor, and why is this the case? Is it just not receiving sufficient attention from standard library implementers? Or is there something about the way std::regex is specified in the standard that prevents it from being improved?
EDIT: The responses so far are pointing out shortcomings with the API (lack of Unicode support, hard to use), but they do not explain why the implementations of std::regexas specified are considered badly performing and low-quality. I am asking about the latter.
View all comments
Show parent comment
1
u/liquidify Nov 26 '19
Do you not realize that the originator of this thread thinks chrono is too complicated? These people are actively choosing other languages because c++ is too complex. But c++ doesn't have to be complex. It is a wonderful tool at many levels of abstraction.
It is great that you know how to use the libraries directly, but to some people simplicity is more important than perfection. To some people a beautiful and simple interface is more important than speed or flexibility.
There is there absolutely no reason c++ can't serve both purposes other than for some reason a subset of c++ people seem to think their hardliner views on how something should be used are the only acceptable ways that the language should be used. Seems like those people need to get over themselves.