###Its called Table in most systems:
Its called Table in most systems:
OO systems that provide the concept of an Interface
support swapping out implementations transparently. Java specifically does this Collection
<- List
<- ArrayList
, LinkedList
, etc.
C++ supports this as well. Python supports this. C would not support this directly.
Dependency Injection in the languages that support this would making plugging concrete implementations in and out configurable as well.
Java: For a extremely generalized interface Guava has the
Table
interface and enough specific implementations to cover almost all cases.Lua really on has one collection type and that is
Table
.
A Table
interface can serve all the general purposes of an Associative Array
as well as a random access normal Array
if you just use numbers for the keys.