hugo wrote: > One nice thing about chained methods is, you can pass around the query > object and modify it after the fact. Think "curried queries" - you > build a partial query and pass it to a function, which itself can add > more query specifications or ordering or stuff like that, without > needing to know about what the actual query is. This opens up a really > nice way to build generic code: you only need to put those query > specifications into your code that _your_ code needs, any filtering for > example can be done outside. > > And I think all/filter is quite nice, too - that way you can see > directly whether a query starts with the full set or wether you work on > a subset. Sure, this can be done with one single method with > parameters, but I rather like the distinguished method names - it's > more readable to me.
+1 to this argument from me. I, too, like "all/filter" -- explicit is better than implicit. TK