pipe

Jason Johnson jason.johnson.081 at gmail.com
Sat Sep 1 10:03:31 UTC 2007


On 8/30/07, Fabio Filasieno <fabio.filasieno at gmail.com> wrote:
>
> This is absolutely false.

Everything he said was correct.

And also, instead of calling it the very confusing "pipes" I think we
should call it then "then" operator.  That is, it clearly says "do
this to completion, *then* do this".

> Smalltalk-80 lacks the concept of EASY "pipes" (chained functional
> applications)
> as it is evident from the difference between
>
> (((obj method:param1) method:param2) method:param3)
> and
> obj method:param1 | method:param2 | method:param3.
>
> Smalltalk does't have EASY chained message sends .

To be totally honest here, I have no problem with the first.  And it
certainly isn't a problem in prototyping because the Squeak browser
has things to help you when you need to go back and add parenthesis.

> Smalltalk is  inconsistent too.
>
> obj send1 send2 send3.
>
> A perfect pipe. Is it ? Too bad that you can do only it sometimes not when
> you want.
> You can do it only if the method has no parameters.

That is not remotely inconsistent.  It is simplicity in syntax.  You
have to make choices in how to have your syntax and Smalltalk has the
second simplest syntax I have ever seen.

> This is a fact. No opinions.

Come now! :)

> It's inconsistent and easy chained functional applications are missing, and
> this has dramatic effects on the rest of the language.

Begging your pardon, but while it could certainly be convenient at
times... dramatic?

> I've shown how it's not just a syntax change. It will have a domino effect.
> It will change dramatically the whole language.

But you have not shown that.  You suggested a new separator and then
fantasize about what might happen if we used it.  That isn't showing,
that's dreaming/hoping.

> BTW, to the real functional programmer, programming is about function
> selection and function application.
> It just happens that the `|` is traditionally used to separate pattern
> matching. But other characters could be used and have been proposed.
> To the eyes of a real functional what strikes most is the absence of an easy
> "function application" (not very precise thou, because smalltalk have
> objects and messaging)
>
>
>
>
>   If we think about the magnitude of changes from Smalltalk-72 to
>
> Smalltalk-76 to Smalltalk-80, I hope the change to the language has
>
> that kind of magnitude.
>
> Putting the pipe will dramatically change the language.
> It will become more functional, instead for more objective.

It already uses many functional constructs.  Changing from having to
use parenthesis to disambiguate to using a "then" operator for that
isn't such a fundamental shift.

> Objects will have some reasons to stay dumb instead of smart.
> Long chains will start to appear and will replace the need for complex
> objects.

Well make an image that has your "then" operator and distribute it.
Lets see if your predictions come true.  Though some how I doubt the
thing holding most people back from coming here has been the missing
syntactic sugar for all this time.

> I like Smalltalk because the guys who did it got right that programming is
> for humans. The only a structure similar to a living organism can be able to
> deal with complexity. But at the same time they, in my humble opinion, they
> missed that humans - and this is important - think functionally. This is
> true today, was true in past, and will be true in the future.

This is also wrong.  Functional programming is by far the minority.
It's probably gaining more people then Java, etc., but that doesn't
prove much.  It's easy to go from 1% to 2% (doubling your size), but
95% to 96% is very hard and has little impact.


> Putting the pipe is a HUGE change. It's like saying "Smalltalk is a
> functional programming language. By the way it's also an object oriented
> one".

I just don't see that.  But make a special image and prove me wrong.



More information about the Squeak-dev mailing list