Type Driven Design

  • using types as the primary tool for guiding the design and implementation of software

  • Types as Design Tools

    • Types are used to express and enforce the constraints and structure of data and functions. By designing with types in mind, you can ensure that your program adheres to certain guarantees, reducing the likelihood of bugs and making the code more maintainable.

  • Type-Driven Development

    • This approach often involves iteratively refining your types as you develop your application. You'll start with a rough idea of what types you need and then refine them as you gain more insight into the problem domain and the requirements of your application.

  • Type Inference

    • In languages with strong type inference, types can often be inferred by the compiler, allowing you to focus on the high-level design and logic rather than explicit type declarations.

  • Type-Level Programming

    • Some type-driven designs involve using type-level programming techniques to express complex invariants and constraints at the type level, providing additional safety and correctness guarantees.

  • https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/

Last updated