3 ms·
For me, it’s a useful tool when processing data, and I can appreciate some ideas like avoiding mutation, but as an overarching paradigm it doesn’t seem particul
by draw_down 8y ago
For me, it’s a useful tool when processing data, and I can appreciate some ideas like avoiding mutation, but as an overarching paradigm it doesn’t seem particularly helpful. But I guess I’m just a blub programmer
- kwhitefoot 8y agoMost of the code that I write, whether C#, VB.Net, or even VBA, I generally write as much as possible in functional, single assignment style, with all information needed for a function passed as arguments even if the routine could have just grabbed the value from a global. So generally only the top most layer does any mutation. I think it saves me a lot of debugging because I don't have to worry much about side effects and I always know what a variable actually means. It also means that when I want to reorganize the code or extract a function to use it in another project that there is less work to do.
- draw_down 8y agoSure, that sounds like the code I write too. What I meant by FP as an overarching principle was stuff like wrapping side effects in monads and generally pretending your program is just a math routine that happens to include a few side effects. I don’t find that a useful way to organize programs.