News for hackers. Stuff that matters.
Re:Comparison of C++17, Go, and Java for a next-generation s... by cozzyd on Thursday April 23, 2020 @06:56PM (#22962541)
why not just define std::dict or something like that that is better?
Re:Comparison of C++17, Go, and Java for a next-generation s... by WesternStar on Thursday April 23, 2020 @07:48PM (#22962997)
Because you should be able to find a good hash data structure for your language. You shouldn't be able to accidentally get a bad one. It should arguably be the first data structure you reach for.
Re:Comparison of C++17, Go, and Java for a next-generation s... by imtringued on Friday April 24, 2020 @07:57AM (#22967019)
Deprecate the old data structure. Even Java did that. Originally it had the Vector class as primary List type. Nowadays everyone uses the List interface and ArrayLists as default implementation.

You can even find this in the javadoc of the Vector class:

>As of the Java 2 platform v1.2, this class was retrofitted to implement the List interface, making it a member of the Java Collections Framework. Unlike the new collection implementations, Vector is synchronized. If a thread-safe implementation is not needed, it is recommended to use ArrayList in place of Vector.

Re:Comparison of C++17, Go, and Java for a next-generation s... by gpderetta on Friday April 24, 2020 @04:21AM (#22965773)
I think the parent is proposing adding a better hash map to the standard library but with a different name to preserve backward compatibility.