• potatoguy ( potatoguy@lemmy.eco.br ) 
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          9 months ago

          I didn’t know about vavr, I think a lot of things from it were added since Java 17, but this Try<T> seems cool.

          Edit: Either would be nice too. I’m going to test some of those things, thanks for the recommendation!

          • Very pleased to have been of help! I love scala but Java really isn’t too bad (streams API is fine except that you need to explicitly move in and out, rather than getting to do the cool scala thing of just using methods in the phenomenal collections library) and I don’t like dunking on it, but it really does need a few helper libs. Tuples, either and try I think vavr has. Java seems to have covered most other stuff now. But been a half decade since I’ve written more than 10 lines at a time so hasn’t come up for a while. Sorry. Reminiscing. Sunday night blues.

    • I mean Yeah it is an afterthought in the Sense of that Java was Originally an oop Language but fp in Java was added on very sensibly imo. I use functional Programming in Java a Lot and try to make Everything immutable where I can and honestly coding like that feels clean and very practical.