News for hackers. Stuff that matters.
Re:Darwinian data structure selection by _Codemonkeyism on Friday December 14, 2018 @06:39AM (#18680140)
I do find this interesting because many code bases I have seen use collections in the wrong way.

What could help many developers though is if an SDK would provide a factory like

    List.new[FastIndex, FastInsert]
and check at compile time if such a list can be found that satisfies all constrains (ArrayList, LinkList, CopyOnWriteList, HashSet, ...).

Currently most SDK leave this to the developer, who than mostly uses whatever he knows best and likes, say ArrayList.

(Unrelated a company should have an explantation when to use List, Seq and what in interfaces).

Re:Darwinian data structure selection by hairtuq on Friday December 14, 2018 @12:45PM (#18682758)
There is a tool that synthesize data structures based on the requirements similar as you describe: https://github.com/CozySynthesizer/cozy. It can handle even involved constraints that are not fulfilled by any off-the-shelf data structure. It's not integrated into an SDK though.