Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf]
by KMag on Thursday April 15, 2021 @06:08AM
(#26818462)
Depending on how your code is structured, phantom types might work for your use case. They're useful for tracking metadata about the values being passed around, even though the methods and fields don't differ between your use cases.
[ Parent
| on HN ]
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf]
by pmontra on Friday April 16, 2021 @10:30AM
(#26834336)
I googled phantom types
Haskell: https://wiki.haskell.org/Phantom_type
Python: https://phantom-types.readthedocs.io/en/stable/
Elm: https://dmalashock.com/elm-phantom-types/
Purescript: https://qiita.com/kimagure/items/b576b5bfe370180599f8
I'll give them a read.
Thanks