previous | start | next

What kinds of things you want to do

Waldemar's example:

a = ((x+y)[z])(p, q, x).z;

which could be factored into

var f=(x+y)[z];
a = f(p, q, f).z

This kind of factoring should be possible. In C++ if f is given too general a type, the compiler will warn you that the second statement is in error.

All types for which knowledge of which might make a difference to the expression can be expressed in the type expressions of the language.

class C
{
   field m;
}

// should be able to create another class with a field called M.

new style classes should be accessible by old-style code with out having to restructure the old code. It would be unacceptable to limit old code to accessing only ad hoc properties.

Achieving this compatibility shouldn't force you to give up the benefits of classes etc.



previous | start | next