3 ms·
> That information can be encoded into the class type This. I did the very same thing when dealing with some code that was frequently converting between three
by fho 11y ago
> That information can be encoded into the class type
This. I did the very same thing when dealing with some code that was frequently converting between three coordinate systems. Using Haskell code duplication was close to non existent and still type-safe. Not wanting to sound too fan-boyish ... but that was one of the first times that I realized that a good type-system can help you prevent whole classes of bugs.