Post 3235405 by amiloradovsky@functional.cafe
 (DIR) More posts by amiloradovsky@functional.cafe
 (DIR) Post #3235403 by federicomena@mastodon.social
       2019-01-21T23:21:14Z
       
       1 likes, 0 repeats
       
       It's kind of magic that a richer type system (stuff that lives only at compile-time) can actually lead to smaller memory usage, and no extra code.Currently refactoring a struct that has a field that decides what to do with it, into three newtypes over an inner struct without that field.  The "extra code" was the one that decided upon that field; with the newtypes it's gone.
       
 (DIR) Post #3235405 by amiloradovsky@functional.cafe
       2019-01-22T00:11:49Z
       
       1 likes, 0 repeats
       
       @federicomenaThe type-system removes the need for some run-time checks, and consequently data-structures used only by them.