(no title)
reuben364 | 9 months ago
def a := 1
def f x := a * x
-- at this point f 1 evaluates to 1
redef a := 2
-- at this point f 1 evaluates to 2
But with dependent types, types can depend on prior values (in the previous example the type of x depends on the value t in the most direct way possible, as the type of x is t). If you redefine values, the subsequent definitions may not type-check anymore.
extrabajs|9 months ago