|
|
|
|
|
by mFixman
1698 days ago
|
|
My least favourite example of bad C++ change is deprecating and removing the overload of `std::random_shuffle` that doesn't require a new random device and a random function [1]. Sure, that version was cryptographically insecure, but 95% of the use cases of shuffling have nothing to do with cryptography and don't need to be secured. This is not a case like PHP's `mysql_query` which has an easy replacement: now you must declare an `std::random_device` and `std::mt19937` and pass them to your functions. This nearly made me fail a job interview in an embarrassing way. [1] https://en.cppreference.com/w/cpp/algorithm/random_shuffle |
|