3 ms·
Is it that fun to shit on Java with cherrypicked worst-case and unfair examples? You could use any libraries StringUtils.hasText (any serious app has one) to a
by Traubenfuchs 3y ago
Is it that fun to shit on Java with cherrypicked worst-case and unfair examples?
You could use any libraries StringUtils.hasText (any serious app has one) to avoid the Predicate.not and do static imports (StringUtils, Collectors) to avoid explicitedly naming the classes containg those static methods...
Also your example misses the string collection creation part.
Ultimately we should get, put on one line like your code:
words.stream().filter(hasText).collect(counting());
- mrkeen 3y ago> Is it that fun to shit on Java with cherrypicked worst-case and unfair examples? The person doing the shitting did not pick the examples.
- d35007 3y agoThe kids hate Java, and that's ok. No sense arguing with them. I am happy a tool I use frequently is getting better. I am also happy there are other tools out there.