[ANN] LambdaMessageSend on SqueakMap
Alexandre Bergel
Alexandre.Bergel at cs.tcd.ie
Sun May 14 18:29:04 UTC 2006
Hello,
I like this. But where can I try it ? Squeaksource and squeakmap do
not know about it. I would like to see more about it.
> LambdaMessageSend, aka FunctionalTalk, implements a specialized
> MessageSend subclass and an associated API for functional
> programming in Squeak.
Few months ago I worked on a module calculus. I first did an
implementation in Squeak, but I had to switch for Scheme, mainly
because of the closure.
>
> you can do things like:
>
>  x y f g j 
>
> x _ Lambda x.
> y _ Lambda y.
Why do you use the term lambda to create a variable ?
> f _ ((x*x) + (y*y)) sqrt.
Why is there no term named lambda here ?
> self assert: f printString = '(((<x> * <x>) + (<y> * <y>)) sqrt)'.
> self assert: {3 . 4} ~~> f = 5.
> g := ('y' > 0) ~>> f.
I like this mechanism of curryfication.
> self assert: g printString = '(((<x> * <x>) + 0) sqrt)' .
> self assert: 3 ~> g = 3.
>
> j := ('y' > (Lambda z1 + Lambda z2)) ~>> f.
I did not get this one... Could you explain a bit ?
> self assert: j printString = '(((<x> * <x>) + ((<z1> + <z2>) *
> (<z1> + <z2>))) sqrt)' .
> self assert: {3 . 2 . 2} ~~> j = 5.
>
>
> see the test cases in FunctionalTalkTest for comprehensive
> documentation.
Where are they ?
> I would be interested in feedback and criticism from languages gurus.
>
> the idea here is to define a MessageSend those receiver, selector
> and arguments can themselves be MessageSend. It seems to me that we
> get this way a clean lambda calculus framework but of course I may
> be wrong.
It seems to me that, what is tricky with lambda calculus are the
evaluation strategies...
Cheers,
Alexandre
>
> what do you think ?
>
>
> Stef
>
>

_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
More information about the Squeakdev
mailing list
