Hacker News new | ask | show | jobs
by noxToken 3269 days ago
> The enlightened sit nodding along, while the unenlightened go away confused or misled. Positioned this way, half-understood ideas frequently do more harm than good.

I think this puts a lot of things into perspective for me. There will be a blog post about some topic on HN, and it seems that everyone in the comments just gets it. Yet I'm over here like, "Yes. I know some of those words. Maybe I'll get the concept a bit more next year." Time passes. I'm still none the wiser.

Functional programming was one of those weird topics for me when I first started programming. It's pretty straight forward on the surface. Some X has to go in. Some Y has to comes out. If it didn't originate inside the function, then it does not get touched. Yeah but why? Who cares if I have a variable outside of the function scope that gets modified? Didn't I declare it globally specifically to have access to it anywhere? What's the point of all these stupid rules when languages give me the ability to do so much more? But all these people can't be wrong, can they?

So I shoehorned it in. I tried to make everything I wrote as functional as possible. I started creating convoluted, over-engineered garbage that was needlessly complex. Nothing felt right about it.

Then I actually tried it. I sat down with a somewhat pure language to learn functional concepts, and it clicked. I see why people extol the virtues of functional programming. Like you've noted, not understanding the reasons behind using functional programming can lead to a convoluted mish-mash of cleverness that doesn't belong.

1 comments

Another problem that I've noticed with FP especially (although I get the impression that OOP had this problem too when it was the new hotness, and I've seen hints of it happening with Rust) is that there seem to be a lot of novices who fall in love with the concept and start evangelizing it, convinced that This Changes Everything. But they can't back it up with a lot of practical experience, can't describe any caveats or limits to its scope, don't have useful knowledge of the practical pitfalls, and so on. So when you bring up something in your domain that seems like it would be difficult, they don't have the foundation to say "this is how you solve that kind of problem" or "yeah, that's still difficult". Instead they deflect or try to subsume it under some vague principle that doesn't actually address your concern.
This is a problem with people, and not at all specific to FP.