r/java • • Jun 10 '24

[deleted by user]

[removed]

613 Upvotes

594 comments sorted by

View all comments

Show parent comment

5

u/zabby39103 Jun 11 '24 edited Jun 11 '24

You can use stuff like Paguro or Vavr to get those features. I suppose that you can say that you'd prefer to avoid anything that isn't in the base language, which is definitely a point for consideration. You have to be careful not to use something that stops working.

My point was that you can code how you like in most major languages. If you really want to use a particular design pattern you typically can. Especially if my whole team is composed of Java experts, even on a greenfield codebase I'd need a pretty compelling reason to switch languages. It would have to be a combination of things, not just wanting to use functional programming.

If other considerations were in play I could switch. Like no popular java frameworks for what I want to do, all the good libraries for what I want to do are in another language with no alternatives, the emerging labour force for doing this thing are not or are no longer Java developers (and I'm boxing us in to a dead end - i.e. JSP).

It's a balancing act of working with your team's strengths, not being too weird, not ending up in a dead end, trying to make sure at least some people can understand the full stack without knowing too many languages, being flexible etc.

2

u/oakles Jun 14 '24

use Paguro or Vavr as a stand-in for functional programming

stop lol