semantics and optimizations

rinus plasmeijer rinus@cs.kun.nl
Mon, 9 Mar 1998 23:58:58 +0200


Hi Alan,


>Please make the useage of arrays, and lists similar. I think that the
>implementation differences have colored the syntax inappropriately

I agree that this would be much nicer, however, I don't think it is that easy.

>That solution appears to require a more powerful overloading ability than
>Clean 1.2 has. But God forbid you should actual implement things the same
>way!

One of the reasons for making a new compiler is that we wanted to have a more powerful overloading system, i.e. type constructor variables with multiple variables.
This change required a big change in the current compiler and sometimes it is better to code things from scratch.
The new overloading system makes it much easier to use the same notation for say, lazy lists, strict lists, unboxed lists and the like.
There are disadvantages as well: the type becomes more complex.
Not all programmers want to write down functions in an overloaded manner.
There might also be a efficiency panalty.
And, some structures look alike, but they are slightly different.
So, the overloading mechanism will probably not be able to allow arrays, lists, records and the like to be mapped on each other.
We will see what we can do with the new system.

Greetings,

Rinus