TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to live better without Dependency Injection

3 点作者 kentor将近 4 年前

2 条评论

aliasEli将近 4 年前
Dependency injection is an idea that looks nice in theory, but it soon becomes pretty messy in practice. Without DI it is in general not too difficult to debug how an object is created. With DI you will also have to debug through the DI code. Fixing problems with DI configurations is one of my least favorite activities.
al2o3cr将近 4 年前
Say what you will about global variables, they're at least an ethos. :P