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

I think this is something a lot of people overlook too quickly, too. It's pretty easy to get some of the benefits of FP without using Haskell/Scheme/ML/whatever in a lot of languages:

- Write pure functions

- Postpone side effects until necessary (as in, set up the side effect in a way that the side effects inputs are testable)

- Return things when possible, in order to increase the expressiveness of your code

It's also important to not fight the language you're working in. If you're constantly breaking idioms and your teammates can't read your code, FP isn't providing any benefit.



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

Search: