4 ms·
The author's attempt to rewrite the cake recipe in a functional style misunderstands the paradigm completely. The correct image here is all the stuff -- oven,
by jonahx 11y ago
The author's attempt to rewrite the cake recipe in a functional style misunderstands the paradigm completely.
The correct image here is all the stuff -- oven, pans, butter, flour, salt, etc -- entering a funnel on the left and producing a baked cake on the right. The funnel itself, if you were to peer inside it, would be composed of multiple sub-funnels: pans with batter + oven as the last step, empty pans and bowls of batter as the step before that, and so on.
It's natural, not weird. The metaphor is used all the time on cooking shows, where they show you bowls of all the ingredients, and the final product next to them.
- braythwayt 11y agoIt’s easy to imagine the funnel you describe, if we imagine we are building a factory for cakes. Naturally, the ingredients arrive on various conveyor belts or in pipes, are mixed, and cakes emerge from the other end.
- SFjulie1 11y agoI love to make fun of FP because people love it. But actually it is boring simple and as elegant as limited. Any language used for programming aims at being understood by humans. So if you make a cooking bot in a MIT lab, you do it in LISP. And FP is ok. But, if you do it in an industrial context programming robots you might use Graph(C|S)et presentation (coding by geometry). And this is OK to have no code and just a diagram. If you do it in a lab, you may use LabView. And in a kitchen, probably natural language. And it works pretty darn well. Programming is not about being right it is about being understood and there are no "one best way" except your code is maintainable by industry standards. So the author just got if wrong by the premisce that functional or whatever matters. It does not.