Hacker News new | past | comments | ask | show | jobs | submit login

But that assumes reducing line count is the goal; one could argue that functional constructs like that sacrifice length in favor of complexity / cleverness.

Mind you I do like and prefer functional style, I've done a lot of the iteration style processing back in Java 1.5 and never gone back to that yet. Functional style expresses the 'what', whereas iterative style spends a lot of code expressing the 'how'.

I'd spread the operations out over multiple lines, one operation per line at least. But that's a personal style preference.




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

Search: