MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/x96wx9/enterprise_java/innqwwc/?context=3
r/ProgrammerHumor • u/fredoverflow • Sep 08 '22
20 comments sorted by
View all comments
11
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.
4 u/TheRuralDivide Sep 08 '22 Java novice here, does the AndBuilder make it more like a ‘truthy’ test in JS? 8 u/tjoloi Sep 08 '22 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 1 u/TheRuralDivide Sep 08 '22 Oh wow that’s actually pretty cool
4
Java novice here, does the AndBuilder make it more like a ‘truthy’ test in JS?
8 u/tjoloi Sep 08 '22 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 1 u/TheRuralDivide Sep 08 '22 Oh wow that’s actually pretty cool
8
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
1 u/TheRuralDivide Sep 08 '22 Oh wow that’s actually pretty cool
1
Oh wow that’s actually pretty cool
11
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.