News for hackers. Stuff that matters.
Re:C++17 Is Here: Interview with Herb Sutter by je42 on Tuesday October 24, 2017 @01:17PM (#15543254)
actually, you should see the pain that you get when having unordered dictionaries by default.

which is the default in python, you get awesome effects, where the order of the unordered dictionary is dependent on the random seed.

where library implementor are serializing a dict into a serial structure (and are not sorting by key). running the same code and same data twice, will get you potentially different results.

now here comes the best. most of the time in python you don't see the difference. the output is exactly the same but never the less the order is not guaranteed.

so I believe having an ordered by default data-store will help the ecosystem.

Calling it unordered explicitly helps, to make sure that anybody serializing the structure will need to make a choice how to sort it.

Re:C++17 Is Here: Interview with Herb Sutter by kllrnohj on Tuesday October 24, 2017 @03:54PM (#15544713)
Even if you want ordered by default a red-black tree is a bad way to get it. JavaScript has ordered maps, but engines like V8 use things like this: https://wiki.mozilla.org/User:Jorend/Deterministic_hash_tabl... instead.

It's not a question of ordered vs. unordered, it's a question of red-black trees vs. a hashed array of some sort.

Re:C++17 Is Here: Interview with Herb Sutter by jnwatson on Wednesday October 25, 2017 @12:06AM (#15547383)
In Python 3.6, dicts are now ordered.
Re:C++17 Is Here: Interview with Herb Sutter by je42 on Wednesday October 25, 2017 @01:14PM (#15551947)
it's an implementation detail. not guaranteed. :( which makes this even worse.