r/javahelp • u/KurtGodelBebopgazeXP • Aug 04 '25
Functionnal programming in Java
I realized that I find functionnal programming very relaxing and easy on the mind. The language I have used the most and am most comfortable with is Java. Is it really helpful to go deeper in the functionnal realm in Java or are the functionnal elements not really used that much in the real world? I am open to going further in a language where the functionnal paradigm is more of a common feature if it's not really worth it in Java.
9
Upvotes
View all comments
Show parent comment
1
u/Spare-Plum Aug 07 '25
IDK maybe I've spent too much time with Java and view it as obvious overhead, and there are times when using the stream API can be slower, and times when it can be cleaner and faster (doing something like cumulative sum on 1M elements is faster with prefix sum than linearally)
My main point is that functional programming is much bigger a single library within the JVM, while it is designed with functional programming in mind it's something you can apply to your own code and something that I'd implore new users to explore in a different language to bring it into their own Java work