3 ms·
If you have a limited set of types, you can make extensive use of higher-level functions that compose frequently-needed operations on those types, and add your
by aasasd 8y ago
If you have a limited set of types, you can make extensive use of higher-level functions that compose frequently-needed operations on those types, and add your closures in the mix. If you have extensible types instead (OOP and such), you either have to program to these types, recreating the generic transformations for each type, or you'll need functions that can do those transformations on arbitrary types―presumably via internal mechanisms―thus circumventing strict type checking.
- lmm 8y agoOr you need to be able to produce appropriately parameterized transformations on user-defined types without compromising safety, such as typeclass derivation?