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

Visitors let you do both. That said, I have used visitor a lot and it never was in a context where lambdas would have helped. There wasn't any variability in the code path such that I might have different implementations of a function at different times, and as the Visitor would have some state in it (an accumulator, a set of config variables, etc.) composing those as lambdas and dispatching to them seems like it would have been less convenient.


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

Search: