News for hackers. Stuff that matters.
Re:Printf(“%s %s”, dependency, injection) by gowld on Tuesday October 19, 2021 @08:12AM (#28917234)
Not true. It's not first class. You can't pass a static class method to a method and then call it. You have to instantiate a Function instance or equivalent.
Re:Printf(“%s %s”, dependency, injection) by IshKebab on Tuesday October 19, 2021 @09:38AM (#28917951)
Ok but that's a separate weird limitation that only applies to Java.

You can pass static methods as parameters in at least C++, Python and Javascript.

Re:Printf(“%s %s”, dependency, injection) by UncleMeat on Tuesday October 19, 2021 @11:59AM (#28919607)
That is orthogonal. Java could easily have free standing functions that are still not first class.
Re:Printf(“%s %s”, dependency, injection) by native_samples on Wednesday October 20, 2021 @06:15AM (#28928910)
That's not actually true. You can use method handles to do that.