News for hackers. Stuff that matters.
Re:Fluent: Static Extension Methods for Java by hexmiles on Monday July 03, 2023 @05:21AM (#36570624)
Can someone explain the rationale for not being able to call a static method on an instance? A lot of programming language do this, I assume there is a reason, but I don't understand what it is.
Re:Fluent: Static Extension Methods for Java by rogerkeays on Monday July 03, 2023 @05:24AM (#36570636)
You can call a static method on an instance. This project allows you to call static methods not defined within the instance's class.
Re:Fluent: Static Extension Methods for Java by mi_lk on Monday July 03, 2023 @06:34AM (#36571064)
And what’s the benefit of that? Except maybe you can chain it and it looks a bit nicer
Re:Fluent: Static Extension Methods for Java by jitl on Monday July 03, 2023 @09:37AM (#36572698)
Tab completion is much better w/ (extension) methods.

I would pay like, $10,000 of my own money for extension methods like this (actually like Kotlin or Swift) in Typescript. That would solve so many abstraction design problems for me!!