3 ms·
Angular2 wants dependency injection and for that to work well it needs named interfaces and thus ends up with TypeScript as its first citizen language. This is
by chvid 11y ago
Angular2 wants dependency injection and for that to work well it needs named interfaces and thus ends up with TypeScript as its first citizen language.
This is fair choice but it shows the background of the designers of Angular and that they in some sense really don't grok JavaScript.
Here is a blog from mr. Ruby-on-Rails explaining why DI is a stranger in the Ruby world:
http://david.heinemeierhansson.com/2012/dependency-injection-is-not-a-virtue.html http://david.heinemeierhansson.com/2012/dependency-injection...
With some parallels I think.
- mercurial 11y agoI'm rarely happy about DI containers, but why wouldn't you want inversion of control in Javascript? We've seen how the "let's just monkey-patch because software design is hard" approach works out: it doesn't.