“The Ruby way” (mixins and class reopening) vs. dependency injection

前端 未结 5 1257
生来不讨喜
生来不讨喜 2021-02-07 06:01

In studying mixins vs. dependency injection, I often hear the phrase \"the Ruby way.\" Often developers say something along the lines of

Ruby lets you reo

5条回答
  •  轮回少年
    2021-02-07 06:19

    I totally agree. Dynamic languages are no substitutes for dependency injection. And nothing stops you from writing one for a dynamic language. Here's a dependency injection framework for Smalltalk: http://www.squeaksource.com/Seuss.html

提交回复
热议问题