|
Why not remove the special constructor subroutine and replace it with a normal function ? :
class Point
{
field int mX, mY;
method void cons ( int x, int y )
{
let mX = x;
let mY = y;
return;
}
function Point make ( int x, int y )
{
var Point p;
let p = Memory.alloc( 2 );
do p.cons( x, y );
return p;
}
}
|