3 ms·
I don’t think that’s such an irony. In FP, minding the conceptual overlap, you could conceivably name every function with a Factory suffix. After all that’s wha
by eyelidlessness 3y ago
I don’t think that’s such an irony. In FP, minding the conceptual overlap, you could conceivably name every function with a Factory suffix. After all that’s what a function does, return a thing it created. Taken to its logical extreme, one would expect far more Factory suffixes for a real program of any significant complexity. But that’s kind of a silly naming convention when every function produces a new value and there aren’t non-Factory things lurking around producing unknowable realities.
- fiddlerwoaroof 3y agoIt’s even better in Haskell: Haskell only has single-argument functions, so multiple arguments are really function factories, and sometimes they produce other function factories. So, the type signature of a FactoryFactoryFactory is something like foldr: (a -> b -> b) -> b -> [a] -> b
- eyelidlessness 3y agoHeh I was thinking about implicit currying too and I just figured that much factorying would break too many brains.
- eyelidlessness 3y agoLest we forget lisp, where literally every thing in a program is a list factory, even the last item in a list. Even a list with no items.