3 ms·
The terrible programming paradigms are workarounds for the terrible language. I read an old blog post about Spring's @Required annotation versus plain construc
by ptx 7y ago
The terrible programming paradigms are workarounds for the terrible language.
I read an old blog post about Spring's @Required annotation versus plain constructor injection and typed out a small example to get a feel for it – a simple class with one required and one optional dependency – which resulted in
23 lines of plain Java with constructor injection, or
16 lines of Java with Spring @Autowired magic, or
7 lines of Kotlin – no magic needed.