BaseXdb/basex — comment on commit f5663e4990fe1b375558c922208b5330f2af9ed3
File: src/main/java/org/basex/core/Context.java line 97
By LeoWoerteler:

No worries, I still kind of know how imperative programming works :-P.
My point was that generally `isEmpty()` is the safer bet because it can be internally represented as `size() == 0` if that's fastest. It doesn't work the other way round, so one should use `isEmpty()` every time one doesn't exactly know how the underlying collection is implemented. And it's more readable, too!