/designing-with-nim-types

Nim translation of Scott Wlaschin's "Designing with types" series

Designing with Nim types

Nim translation of Scott Wlaschin's Designing with types series.

It is recommended to read Scott Wlaschin's article (the F# version) first, as it explains the concept carefully. Then click on the Nim version to see the Nim translation of that concept.

Article with F# code Nim code
Introduction Nim translation
Single case union types Nim translation
Making illegal states unrepresentable Nim translation
Discovering new concepts TODO
Making state explicit TODO
Constrained strings TODO
Non-string types TODO
Conclusion TODO