News for hackers. Stuff that matters.
Re:Functional Programming Is Not Popular Because It Is Weird by typon on Saturday February 27, 2016 @06:32PM (#11188989)
Why the heck would you write the functional recipe the way he wrote it?

1. Take an oven and apply 175 C setting on it, producing a preheated oven. Set this aside.

2. Take two 8 inch round pans and some grease and flour, produce two 8 inch round pans with grease and flour applied on them.

3. Take a small bowl, some flour, baking soda, salt, salt and a whisk (a first-class function), return a small bowl with flour, baking soda and salt whisked in it.

and so on.

When you think of functional programs as series of operations chained together, it becomes really natural. In most recipes you don't need to loop back to an existing state.a

Re:Functional Programming Is Not Popular Because It Is Weird by pekk on Saturday February 27, 2016 @06:45PM (#11189029)
The real cake recipe can specify how to achieve the results instead of just saying that they should be achieved. It does not have to deal with issues like lazy evaluation or defining a batter monad. It does not have to trail off into "and so on" or else go on for far too many lines because of how tortured an exercise it is to make "pure functional" cake recipes.

If you want to argue with this, just deny that cake recipes are a good metaphor for programming, since they are essentially imperative and that is begging the question. But you aren't going to convince people that weirdly abstracted cake recipes are easier to write or follow.

Re:Functional Programming Is Not Popular Because It Is Weird by DrScump on Saturday February 27, 2016 @11:00PM (#11189766)
Plus, you can do multiple iterations, skipping step 1 for subsequent iterations.