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

> This is where composition helps.

It does, though in my experience it leads you down a path that ends in some pretty strange names, as you nominalise more and more nebulous concepts, trying to verb in the kingdom of nouns.



Is that any different from foldl, foldr, reduce, map? If you have a generic data type you want your operators to be generic, regardless of whether they exist as methods or as separate functions. The only difference is that the object is free to not leak internal implementation details.




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

Search: