Intermediate Compilers & Programming Language Theory
Q45 / 100

What is a dependent type system?

Correct! Well done.

Incorrect.

The correct answer is B) A type system where types can depend on values, enabling types like Vec<T,n> (length-indexed) and compile-time verification of program properties

B

Correct Answer

A type system where types can depend on values, enabling types like Vec<T,n> (length-indexed) and compile-time verification of program properties

Explanation

Dependent types (Coq, Agda, Lean, Idris): types are first-class values. "length-2 list" is a type. Addition with dependent types: add : Nat → Nat → Nat with proof of commutativity. Programs-as-proofs (Curry-Howard).

Progress
45/100