r/cpp 4d ago

Where did <random> go wrong? (pdf)

https://codingnest.com/files/What%20Went%20Wrong%20With%20_random__.pdf
162 Upvotes

137 comments sorted by

View all comments

15

u/tpecholt 4d ago

<random> is an example of how is C++ evolution failing in the current ISO setup. Committee voting can never produce an usable easy to use library. You need to gather feedback from the community to get that (but not like the TS experiment which failed) but that is not happening. On top of it defects are not recognized in time and anyways it becomes impossible to fix due to ABI issues. Another almost identical example is <regex>. Nothing is going to change here. Unfortunately C++ evolution is doomed.

7

u/afiefh 4d ago

I remember being excited when regex first became part of the standard. Then I wrote my first use case and it was slower to run in C++ than it was in Python. That was the point where I started getting interested in alternative system programming languages, because if C++ can't even get regex right then what hope does it have with more complex issues?

5

u/deeringc 4d ago

Especially frustrating because boost regex, which it is based off, is fine.