pipe

Fabio Filasieno fabio.filasieno at gmail.com
Thu Aug 30 11:55:05 UTC 2007


On Aug 30, 2007, at 7:55 AM, Yoshiki Ohshima wrote:

>   I don't see real benefit to change the language just to achieve a
> very tiny, tiny subjective benefit at some corner cases.
> As many have pointed out, the unary messages or binary messages are  
> already "piped"
> (strange word, as they are just ordinally chained expressions after
> all).  So, insisting that Smalltalk-80 lacks the concept is not simply
> true.
>
This is absolutely false.

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 the daily programmers life means: either you do
   - collect:thenSelect:  -> This is a big source of bloat...
or:
   - ((obj collect:...) send: ...)   -> well... this is simply ugly  
and difficult write while prototyping

no other way in Smalltalk.

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.

This is a fact. No opinions.

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


>
>   Many proposed syntax for it in this thread are tiny syntax sugar,
> and comes with a lot of unnecessary surprises.  (I like the clever
> tricks and aesthetic sense people have shown, though.)
>

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

>   BTW, to the eyes of a real functional programmer, the message
> patterns connected with '|' looks like a pattern matching expression.
> This will be another reason to say it is an unnecessary surprise.
>

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.
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.
Economically the users in the long term will search for a `common`  
protocol to maximize the `get free combined functionality` effect.

Each point has examples, historical references and quantitative  
analysis. It's not just opinions of one guy.
Is what all the others are doing (unix, lisp, erlang, haskell, ocaml).

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.

And smalltalk IS good for functional programming but it needs this  
fix, if it want's to do the job really well.
But the community might say "we don't want that".
Or might say "make smalltalk more attractive to functional programmers".

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".


On Aug 30, 2007, at 7:55 AM, Yoshiki Ohshima wrote:
> If one feels that he has to use many exclamation marks
> in a row or many capitalized words when he is supposed to convince
> people logically, it is a "smell" of lack of deep logic.

I'm writing in a discussion group. I'm not writing to publish a  
paper.  I'll put as many exclamation marks I want, as many question  
marks I want and USE ALL THE CAPITALIZED WORDS I WANT. Or I mIgHt  
EvEn WriTe Like ThIs. Joking :-). But I do apologize for my writing  
skills, and will do better.

But my arguments are clear, logical, supported by history references  
and examples.

I'm sure you can do the the hard work of ignoring the capitalized  
words and exclamation marks as many are doing, and focus a bit more  
on the message that I'm trying to convey.

Fabio Filasieno



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070830/9cb0caa7/attachment.htm


More information about the Squeak-dev mailing list