pipe and system building

Jason Johnson jason.johnson.081 at gmail.com
Sat Sep 1 13:37:29 UTC 2007


Ok, this is getting worse then election year in the states.  The sheer
volume of controversial, incorrect and downright nonsensical comments
made in this thread is just out of control.

On 8/28/07, Fabio Filasieno <fabio.filasieno at gmail.com> wrote:
>
> There is a high risk of developing
> functions that you don't need. This is on of the main critics OOP.

Oh?  I did a quick google search and I did see a lot of complaints,
though none of them were "developing functions that you don't need".
How do you determine this is one of the main criticisms?  A link
please.

> When I was a bit younger I often made this mistake:
>
> Lets a make a nice apple object. The nice apple must have the `eat` method
> of course. An apple that cannot be eaten is rally a terrible apple, is it?
> So let's invest some time in our apple `eat` method. But here is the mistake
> ...
> you are writing code to make pies. You will never eat the apple directly.
> You have just spent brain and time budget on something useless: the `eat`
> method on the apple object. I bet this is the main reason for code bloat in
> OOP and Smalltalk too.

Is no one else ever going to use your Apple class?  The core classes
in Smalltalk/Squeak are there to be general.  Not for one application.

> Now you can't tell me that  :
> data select: ... | map: ... | collect: ...
> this NOT understandable.... it's only a bit verbose... but since it's
> functional it's CLEAR

Since it's functional style it's clear?  Based on what?  Because *you* know it?

> Give it time. Functional programming has this amazing property that you can
> easily reason about problems, especially when side-effect free.

Given your statements on this list I suspect I am much more well
versed in functional programming then you are.

> I want that in Smalltalk.
> I can't do it with parenthesis. It disturbs me. I have to break my thoughts.
> I need the pipe.

So add it.  If anyone else has your problem they may use it too.

> And I'm sure that any functional programmer (from ocaml, erlang , haskell,
> ... ) would understand what I'm talking about.

I use all those languages and I understand function composition.  But
the problem is you vastly overstate the "pipe" operator.  If it's so
important to functional programming why is it not even present in:
Ocaml [1] (or any ML for that matter), Erlang, Lisp.... actually, come
to think of it the only two places I know of that have such an
operator is certain Unix shells and Haskell.

The fact is it doesn't even play such a large role in Haskell.  The
function composition operator (the period) is much much more
important.

[1] http://caml.inria.fr/mantis/view.php?id=2415



More information about the Squeak-dev mailing list