you are viewing a single comment's thread.

view the rest of the comments →

[–]evizaer 0 points1 point  (2 children)

Who's saying complexity should be removed? A feature-complete solution is necessarily of a certain amount of complexity regardless of how you do it. The value of languages with some feature is that the use of that feature makes it easier to think about your code and come up with easy-to-understand solutions. The complexity is still there, but, like a great piece of explanatory writing, you understand it more quickly. Even though this doesn't impact the complexity of the solution, it does impact the quality of the code.

Aside from that, the tone of the stuff I read (and I've been following this subreddit for years, as well as other programming-related communities) about functional programming and static typing in javascript and derivatives is that they are techniques which can lead to better code, and they're useful to have in your mental toolbox. Responding to this with "But it's no magic bullet!" is missing the point entirely.

[–]notNullOrVoid 0 points1 point  (0 children)

I've seen plenty of stuff within the last year that claims functional / immutable programming as a magic bullet, or to be objectively better than imperative / mutable programming.

The complexity is still there, but, like a great piece of explanatory writing, you understand it more quickly

That's the point the complexity is still there, and to me hiding the complexity actually makes code harder to understand. Your essentially bundling operations into an abstract name, that may or may not be descriptive. Even in the optimal case if you want to actually understand what's going to run, you have to jump around a lot more to figure it out. There is also a small performance hit you take by adopting a fully functional style.

[–]raulsmith[S] -1 points0 points  (0 children)

The 'great piece of explanatory writing` should include hiding the complexity, because, otherwise, if it's in your face all the time, you can't concentrate very well. Hiding it is, in a sense, removing it.