Published Sep 3, 2019

SE-Radio Episode 296: Type Driven Development with Edwin Brady

Discover the powerful intersection of type-driven development and programming precision with Edwin Brady, as he delves into the revolutionary Idris programming language and its use of dependent types to enhance software reliability and precision.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Foundations

    Type Driven Development (TDD) is a programming approach where types serve as a blueprint for software construction. explains that types classify expressions, such as integers or strings, and guide the development process by defining what a program is intended to do 1. This method involves writing programs that may not initially type check, allowing the machine to provide feedback and guide the developer 2. Brady emphasizes that types act as a plan, helping programmers to outline their intentions before implementation 3.

    Types are a way of saying what something is, giving a program meaning.

    ---

    This foundational concept shifts the role of the machine from a critic to a collaborator in the development process.

       

    Methodology

    The methodology of Type Driven Development involves a unique process of defining and refining code through the use of 'holes.' describes how developers can write incomplete programs, leaving placeholders or 'holes' for parts yet to be implemented 4. This interactive approach allows the compiler to suggest what needs to be done next, fostering a dynamic conversation between the programmer and the machine 5. Brady outlines a three-step mantra—type, define, refine—that guides this methodology, emphasizing the importance of compile-time type safety 6.

    It's very much a conversation with the programming language.

    ---

    This process ensures that programs evolve with a clear understanding of their intended functionality.

       

    Applications

    Type Driven Development offers significant advantages in real-world applications by enhancing software reliability and consistency. highlights how precise types can prevent programming errors by catching issues at compile time, thus improving security and functionality 7. He discusses the use of dependent types to manage stateful systems, ensuring that resources are used correctly and efficiently 8. Brady also emphasizes the role of totality checking in ensuring programs produce results within finite time, contributing to robust and predictable software 9.

    Precise types allow you to express that sort of thing in your API to make sure that that kind of error gets caught at compile time.

    ---

    These applications demonstrate the practical benefits of TDD in creating reliable and efficient software solutions.

Related Episodes