[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Map and filter without intermediate tables
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 7 Jun 2012 14:24:17 +0200
On Thu, Jun 7, 2012 at 2:06 PM, joao lobato <firstname.lastname@example.org> wrote:
> Yes, I can see why method chaining seems easier to follow when reading
> code, but it is in contravention of  and I don't want to be stopped
> by the police :-) .
Well, the Thought Police tend to work according to the letter, not the
spirit, of the law.
A very successful implementation pattern has been pipelining (classic
Unix style) and method chaining works like that; one applies
processors to a stream of data (and that data can be strict as it
likes about sharing its secrets).
> Things like list comprehensions, pattern matching as it exists in
> Haskell or Erlang,
I see them as implementation patterns , not for composing large
software systems. Modules should still be minimally coupled, and do
their one thing well. We would all agree that a module that mixes
database management and GUI generation is ripe for refactoring.
 A list comprehension (for instance) translates into a for-loop
anyway; why does it then become a less useful screwdriver, or more
dangerous than a for-loop?