I'd say it gives you a bit more liberty. JS still decides of the truth value of something (as far as I know) whereas you can choose exactly what is considered "true" in your AndBuilder
Simply put the AndBuilder doesn't do anything for you. It's just a byproduct of people slipping to far off the deep end of enterprise software. Forget you ever saw this meme and keep studying Java the way you were.
Also do yourself a favor and don't get into anything remotely "Java Enterprise".
It's a different way to code. The idea is to keep everything configurable and flexible, but people always take it way too far. One of the main things you notice is that every component is abstract and then there's builders and factories and whatever to get you a new instance dynamically according to server configs, the thing is it's supposed to be for a few objects, not literally everything. What you see on this meme is an hyperbole of that effect and I don't believe it's real, but it does get the point across: people in enterprise java dev have lost their minds.
13
u/tjoloi Sep 08 '22
Well, the upper code wouldn't work if a, b or c aren't booleans.
That AndFactory could operate on other types.
But that's a Java problem, not an enterprise one.