Functional Squeak

Mats Nygren nygren at sics.se
Sat Jun 3 17:21:44 UTC 2000


Brian Rice <water at tscnet.com> wrote:
> [snip]
> >- I have some concrete ideas to share if requested, if not I'll wait
> >with this for a while.
> >
> >/Mats Nygren
> 
> I'd definitely be interested in seeing what your thoughts are on this, as 
> I'm currently involved in development of a compiler that works extensively 
> with higher-order functions and immutable objects.
> [snip]

Please tell me about the compiler project. Privately or to the list.

I apologize if it sounded that I have some powerful compilation strategy
or something. I havnt. What I meant is to define a bunch of methods,
like Symbol>>value:value: that gives access to a functional style of
writing, using the execution mechanisms that already exist within
Squeak.
My inspirations in this includes John Backus classic paper (.. von
Neuman style ..), Combinatorial logic material, Category theory,
Algebra. At its best it leads to short and elegant programs.

I will write more on this soon. The subject is exciting especially if it
will fit well with Dan Ingalls Fabrik that is forthcoming, which is what
I hope. D&D functional programming within the already excellent Squeak
environment.

A small taste of it:

Identify "value:" with functional application

with
Set>>value: anObject
	^ self includes: anObject

a set will be its characteristic function and for two sets a and b
	a select: b
is the intersection of the sets.

I intend to prepare a bunch of this kind of stuff and present it to the
list. Next week lets say.
Under the subject "more value?"

On the subject of immutable objects I support introducing constants
within methods, that is local variables that do not change binding. This
needs some new syntax though, a difficult topic (at present).

/Mats





More information about the Squeak-dev mailing list