Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dboreham
on Jan 8, 2023
|
parent
|
context
|
favorite
| on:
The problem with dependency injection frameworks
Dependency Injection is just a fancy, obfuscating, name for global variables.
paulmd
on Jan 9, 2023
|
next
[–]
No. And injected classes aren't always even global, there is such a thing as a class-scoped dependency injection.
https://docs.spring.io/spring-framework/docs/3.0.0.M3/refere...
justesjc
on Jan 8, 2023
|
prev
|
next
[–]
Yup, seems to be a lot of stockholm syndrome here. Repeating marking literature...
endofreach
on Jan 9, 2023
|
prev
|
next
[–]
Not really. Dependency Injection is the way of how to access „that global variable“ (and how to define it).
throwaway_au_1
on Jan 8, 2023
|
prev
|
next
[–]
In what ways are DI and global variables similar?
molszanski
on Jan 9, 2023
|
prev
[–]
global variables is dependency injection via global context. This is just one flavour
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: