Types
The Idris example seems to need further explanation:<p>&gt; In Idris, we can say &quot;the add function takes two integers and returns an integer, but its first argument must be smaller than its second argument&quot;:<p>&gt; add : (x : Nat) -&gt; (y : Nat) -&gt; {auto smaller : LT x y} -&gt; Nat<p>&gt; add x y = x + y<p>That&#x27;s all well and good, if you know the values of x and y at compile time. Consider a program that reads x and y from STDIN. The user could provide an x that is equal to or larger than y (or could provide only one value, or values that are not numbers). I see no way to deal with that except to throw a runtime error. Is that what would happen?