3 ms·
I feel like when people are comparing languages, they are exaggerating.. For instance: public boolean hasUpperCase(String word) { if (word == null) {
by d0m 15y ago
I feel like when people are comparing languages, they are exaggerating.. For instance:
public boolean hasUpperCase(String word) {
if (word == null) {
return false;
}
int len = word.length();
for (int i = 0; i < len; i++) {
if (Character.isUpperCase(word.charAt(i))) {
return true;
}
}
return false;
}
or
public boolean hasUpperCase(String word) {
if (null != word)
return any(charactersOf(word), new Predicate() {
public boolean apply(Character c) {
return isUpperCase(c);
}
})
else
return false;
}
- swannodette 15y agoSmall inconveniences add up fast. For example https://github.com/clojure/core.logic/blob/master/src/main/clojure/clojure/core/logic/minikanren.clj https://github.com/clojure/core.logic/blob/master/src/main/c.... It's a 1000 lines of Clojure, I strongly doubt that this could be implemented in anything less than 5000 lines of Java split across 10 files.