I'm trying to understand the history of Dependency Injection in compiled languages, as an intentional feature of the language. The Wikipedia article on the subject is decidedly Java focused, but I know earlier languages supported OOP with interfaces (e.g. pure virtual methods in C++ abstract classes).
According to the design pattern described in the link, a clear requirement on the language compiler is support for something akin to
Edit: Then, polymorphism is used to morph the concrete, run-time object into the expected abstract class type used by the client.
A class (Client) accepts the objects it requires automatically at run-time.
- A class can use objects solely through their interfaces (ServiceA,ServiceB) and doesn't have to care about how the objects are created.
- This greatly simplifies classes and makes them easier to implement, change, test, and reuse.
Which OOP language compiler first provided this capability directly in the language's system of typing objects?
NOTE: I'm not really looking for speculations on how one might hack this in assembly, C, Fortran, etc., though that would still be interesting if it relates to the history of the feature's evolution.