3 ms·
Well that is genuinely impressive then. Please explain to me how the fact that no chemical reaction occurs when beating an egg is in any way relevant, or even
by papsosouid 14y ago
Well that is genuinely impressive then. Please explain to me how the fact that no chemical reaction occurs when beating an egg is in any way relevant, or even related to the discussion, or anything I said. I didn't say beating an egg caused a chemical reaction, and at no point would anyone who has even the loosest grip on reality consider that to be relevant at all.
Had you just suggested that beating eggs is a side effect, and thus not purely functional you would have gotten a response. But when you go so far off the rails that the only reasonable explanations are that you are trolling or insane you shouldn't expect people to take you seriously enough to bother responding.
Yes, beating an egg changes the state of the egg from unbeaten to beaten. Yes, this is a difference, however it is not a difficult to understand difference. I explain it all the time, that's why I used it as an example. "With functional programming, instead of the egg_beater function changing the egg, it takes in the unbeaten egg, and returns to you a beaten egg. If you gave the unbeaten egg a name, you can still use it.". That is easy to understand, which is why people respond with "oh, ok" instead of confusion. This concept has to be understood when teaching OOP too, as generally methods that just change state return "this" so you can chain method calls: egg->beat()->fry(). So proposing that it is some unfathomable difficulty with learning FP is ridiculous.