Hacker News new | ask | show | jobs
by lambdom 5954 days ago
Well, you choose how you want to name your function. That you code in a functional style, or in python or in haskell has nothing to do with that. And the fact that you use high-level level function based on maths is still a choice of yours.

What I say is by using a functional style (might it be in java, c++, haskell, scheme, python, or whatever), it makes testing, threading and understanding things easier.

For instance, it's easier to test an immutable class since once it is created, it will never change.

Threading is also simplified since you don't have to think about your object being corrupted by 2 threads mutating it.

Understanding is simplified in the sense that it's easier to quickly get an idea of what an object is doing because it only has 1 state at a time.

But please, don't think I didn't understand your point about obscurely named function and bad code.. Often when people show functionnal code, they try to show how short the code is so they make it practically unreadable for the novices - which is indeed not the best way to show the vertue of FP.

"you'd be much better off writing it in Python." => Nothing stop you from using FP in python :)