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

> I'm not actually a fan of functors; I think they obscure the flow of the code, in the same way as using inheritance in OO

While functors aren't something to us every day, aren't they more of an equivalent to the Decorator pattern in OO (which is more about composition and inheritance of interfaces as opposed to inheritance of concrete implementations which I agree is something to avoid)?

That said, I think I see what you mean -- I've found myself using functors needlessly because I've previously used adapters in their place in Java; instead, it may have been for it for me to ask myself what the real problem I'm trying to solve is.

Registration is open for Startup School 2019. Classes start July 22nd.

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