Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorry, must of given off the wrong impression. I'm quite happy with FP in general, I'm just aware it is possible to write some pretty horrendous things. But yeah you are completely right about (4), at some point it doesn't seem like overkill anymore.


I was very much trying to find an answer to your

> It can be a real pain to read code like this if it's overdone

wherein (4) is, when things start getting complicated, a way to end up avoiding things turning into closure soup. Also being able to selectively override things with inheritance can really help factor things out and clean things up.

> at some point it doesn't seem like overkill anymore.

Though I suspect "at that point, ask yourself if you're overengineering it and only if you're sure you aren't consider moving to a class" definitely applies :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: