I really love the philosophy of chaining methods, like jQuery emphasys in its library. I found it quite elegant and clear.
Being primarily Java developper, I’ve always wondering myself why this practice was not more used in this language. For example, the Collection interface was not designed in the that way (for adding/removing methods), and I found it quite sad.
Is there real cons against this practice or is it just something that has not enough ‘sex-appeal’ before?
Martin Fowler discusses this topic as ‘fluent interfaces’ at http://www.martinfowler.com/bliki/FluentInterface.html. One main issue is that fluent interfaces are designed for humans, therefore frameworks like Spring are not able to understand them. Simplistically using a fluent interface provides maintainability in one sense (readability) but loses maintainability in another (flexibility).