Re:Writing your own C++ standard library part 2
by account42 on Tuesday June 03, 2025 @03:53AM
(#44167527)
The stdlib's unordered_map could certainly have been designed better but there have also been significant developments in hash map implementations since it was added so no matter what they would have specified it would be obsolete by now. Meanwhile adding your favorite hash map to your C++ project doesn't take long at all. The only issue is if you want to pass a hash map between different libraries - there a standard type would be useful. But that also requires a stable implementation that doesn't change which gets the same ossification of sub-par implementations that you already have in the stdlib.
[ Parent
| on HN ]
Re:Writing your own C++ standard library part 2
by simonask on Wednesday June 04, 2025 @05:37AM
(#44178867)
The larger point here is that the ossification is a direct result of the combination of two things: the way that monomorphization works, and wanting to maintain ABI stability in perpetuity.
I don't know how to solve it, but it's clear that C++'s general utility is severely hampered by this ABI stability crutch.