Monday, October 16, 2017

Seeing the power of types

Most applications I’ve seen don’t take advantage of the power of the type system and fall back to primitive types like string, int, … .

But what if you start using the type system to design a more understandable and less buggy application?

You don’t believe it is possible? Have a look at the Designing with Types blog series, it will change the way you write your code forever…

The complete list of posts:

1. Designing with types: Introduction

Making design more transparent and improving correctness

2. Designing with types: Single case union types

Adding meaning to primitive types

3. Designing with types: Making illegal states unrepresentable

Encoding business logic in types

4. Designing with types: Discovering new concepts

Gaining deeper insight into the domain

5. Designing with types: Making state explicit

Using state machines to ensure correctness

6. Designing with types: Constrained strings

Adding more semantic information to a primitive type

7. Designing with types: Non-string types

Working with integers and dates safely

8. Designing with types: Conclusion

A before and after comparison

No comments: