News for hackers. Stuff that matters.
Re:Leaving Haskell Behind by layer8 on Thursday August 24, 2023 @04:47PM (#37254331)
Maven is awfully slow and awfully stateful (plugins or multiple executions interfering with each other), has too many quirks, and documentation is lacking. Gradle is imperative and also stateful.

Dependency injection and annotation-driven development is “magic happens here” that is hard to analyze when something doesn’t work, and hard to reason about in the sense of building a proof that it will always behave in the correct and intended way.

Re:Leaving Haskell Behind by grumpyprole on Thursday August 24, 2023 @05:03PM (#37254525)
Don't forget Scala's SBT, a truly awful design with lots of additional bad taste added on top.
Re:Leaving Haskell Behind by alex_smart on Friday August 25, 2023 @04:38PM (#37266736)
> Dependency injection and annotation-driven development is “magic happens here” that is hard to analyze when something doesn’t work

I don't quite get the criticism against annotations. Metaprogramming and code as data seem to get a lot of love in the context of lisp, python or ruby, but a lot of hate when it happens to be done in Java. I absolutely love the powers that reflection, annotations etc give me.

The difficulty of analyzing dependency injection and "magic happens here" is overstated. Just run the code in the debugger. And if you are having problems with the auto-configuration stuff, you can always selectively disable it and explicitly define the beans you need.

Re:Leaving Haskell Behind by layer8 on Saturday August 26, 2023 @04:32PM (#37276628)
> Just run the code in the debugger.

How do you set a breakpoint on an annotation? You can’t, and that’s the issue. You can’t reason about annotations in the precise way you can reason about library calls.

Re:Leaving Haskell Behind by alex_smart on Saturday September 09, 2023 @09:43AM (#37445315)
> How do you set a breakpoint on an annotation? You can’t, and that’s the issue.

You can set a breakpoint on your normal method and you can see if any proxy object was introduced by the annotation in the call stack and set a breakpoint there. You can also just see the usages of the annotation to see where and how it is being used and set a breakpoint there.

Anyway, going back to my original question, similar criticism is equally valid when you do metaprogramming in lisp/python/ruby. Why are these concerns only raised in the context of Java?