After amazing presentation “Propositions as Types” by Philip Wadler, I felt intrigued and lost. What is the type theory? How can I benefit from it as a software engineer? The story of how I end up applying Type Theory in static configurations files like JSON and YAML. What I learn in the process of this experiment, and how it changed my perspective in software design.
● Total - Evaluation always terminates and never hangs or infinitely loops
● Safe - Evaluation never crashes or throws exceptions
● Distributed - Expressions can reference other expressions by URL or path
● Strongly normalizing - All expressions (even functions) have a normal form
● Statically typed - Configurations can be validated ahead-of-time
● Strongly typed - No coercions, casts or subtyping
● Built-in data types - Includes lists, anonymous records and anonymous unions
● Type Theory is very useful for constructing formal specification
● Writing in “proper language” results in better desing - by design
I need to learn more and try to find answers in places like...
● Effect systems
● Dependent types
● Read formal specifications of type system of other languages
Interested in learning more?
● Read “Type Systems” by Luca Cardelli
○ Type soundness
○ Type inference
○ First & Second Order type systems
● Star https://github.com/widmogrod/typed-config