In ATS2 you can do like this : fun foo {n : int | n > 2} (x : int (n)) : void = println! (x) now calling foo (10) will type check but foo (2) or foo (1) will not.
There seem to be misconception that safe language implies inefficient and slow code . It is not so in ATS2 , generated code is quite efficient and is safe even when manipulating memory from ATS2 .
In ATS2 you can do like this : fun foo {n : int | n > 2} (x : int (n)) : void = println! (x) now calling foo (10) will type check but foo (2) or foo (1) will not.
There seem to be misconception that safe language implies inefficient and slow code . It is not so in ATS2 , generated code is quite efficient and is safe even when manipulating memory from ATS2 .