|
|
|
|
|
by scotty79
1455 days ago
|
|
I would really like a language where you can swap simple data collections like dicts or arrays with others, better defined, employing better suited algorithms without changing everywhere in your code how you access them. So if getting a field using simple structure is mycol[key] it should look exacty the same when mycol is no longer a flexible dict containing adhoc objects but complex strongly typed immutanble trie or btree indexed array because at some point of evolution of your code it became apparent that this is exactly what you need. The only language that I know of that has consistent interface between simple and complex (also custom) collections is Scala. |
|
C# or C++ for example.
Or in fact, you can just define an interface with Get/Set methods. Any language with interfaces supports that and you can swap them out as you please.
Doesn't seem like the language is really the restricting factor for implementing this if you really wanted it.