[squeak-dev] smalltalk evolution

Kamil Tomsik info at tomsik.cz
Wed Jun 1 08:40:33 UTC 2011


> On 31 May 2011 22:43, info at tomsik.cz <info at tomsik.cz> wrote:
>> Example from my previous reply to Randal for illustration:
>>
>> Point new: [x: 3, y: 4, printOn: aStream].
>>
>> Always left-to-right syntax, always one argument, possible multiple
>> receivers and messages, syntax sugar for closures, closure always have  
>> only
>> one argument which is also implicit receiver - you can't deny it's at  
>> least
>> interesting to think about such kind of uniformity.
>
> Absolutely. It's called the lambda calculus. And it's very interesting
> to work things out using lambda calculus, and figure out the semantics
> of statements... but would you really want to program in the lambda
> calculus?
>
> Even the textbooks allow multiple parameter functions, with the
> understanding that \xyz <whatever> is really \x \y \z <curried
> whatever.
>
> frank
>

Lambda calculus has different purpose (evaluation), this is sequence of  
orders
(no return value) in logic left-to-right order.

Actually I'd like to see something very different (in hypertalk style) and  
with
"smart" syntax like:

	Account>>deposit amount = increase balance by amount.
	SomeScript>>doSomethingWith account = deposit amount(100) to account.

This is just sketch, prototype in my head, which wasn't crystalized yet,  
but it's IMHO interesting
approach and could improve readability too.

However left-to-right tell-dont-ask style improves design and is also much  
easier to read and "scan".
(I do write a lot of code this way so I can compare)

It is also very natural for people and their thinking.
(we usually don't want to GET/EVALUATE something, we want things to be  
DONE)

I do not need low-level support in language, I can already code this way,  
but every interaction
with existing library is just pain... Hm, as I think about it, maybe I  
don't need to rewrite libraries, maybe
some kind of dynamic wrapper could be enough...

I'm curious for your opinions. It's very enlightening discussion, thx for  
that.



More information about the Squeak-dev mailing list