4 ms·
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 prov
by _Codemonkeyism 8y ago
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).
- hairtuq 8y agoThere is a tool that synthesize data structures based on the requirements similar as you describe: https://github.com/CozySynthesizer/cozy 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.