Hacker News new | ask | show | jobs
by Jach 3145 days ago
When I'm really disturbed by how something actually works, my approach is to try to implement something similar myself. Object oriented C (structs with function pointers) long ago gave me some insights including why Python has an explicit 'self' for everything. There's a similar exercise you can do in C to better understand the prototype chaining way of doing OOP. Have you tried to make a simple version of e.g. @Autowire that is still capable enough to let a Java app of many modules have one module only depend on an API module and not the implementation module with everything just working without explicit injection? Sounds interesting to me, I bet that would be more enlightening than a summary page, or at least make the summary page more understandable...
1 comments

"without explicit injection?"

In many, many applications explicit injection works just fine and is exactly what you want. But once you say "I am going to write a Spring Boot application", you are pretty much stuck with a big part of your application logic stuck in annotations, even when there is very little benefit over explicit code.