Open GoogleCodeExporter opened 9 years ago
Example guards:
Simple "type" guards like
def m(x : Number); // x must be an AmbientTalk number
Ranges:
def y := 10;
def m(x : Between(1,y)); // x must be between 1 and 10
def n(x : PositiveNumber);
// maybe we want 'anonymous guards', e.g. instead of having to define
PositiveNumber we could define:
def n(x: Number.and: { _ > 0 });
Near/Far ref distinction (as in E):
def m(x : Near); // guarantees that using x.method is allowed
Original comment by tvcut...@gmail.com
on 16 Sep 2008 at 2:03
Original issue reported on code.google.com by
tvcut...@gmail.com
on 16 Sep 2008 at 1:59