Why are IOC containers unnecessary with dynamic languages

后端 未结 9 1439
慢半拍i
慢半拍i 2020-12-04 12:13

Someone on the Herding Code podcast No. 68, http://herdingcode.com/herding-code-68-new-year-shenanigans/, stated that IOC containers had no place with Python or Javascript,

9条回答
  •  独厮守ぢ
    2020-12-04 12:56

    IoC containers really allow for a compositional layer in statically typed, procedural/OO languages.

    This compositional layer exists relatively naturally in dynamic languages such as Python or Javascript (consider that Javascript is heavily based on Scheme).

    You could probably make a good argument that IoC containers are just a generalization of the Interpreter pattern.

提交回复
热议问题