Hacker News new | ask | show | jobs
by MoosePlissken 4533 days ago
Yeah I think it's interesting that the final approach with "logical units" and "collaboration units" mirrors a functional approach with "functions" and "higher-order functions". The advice to write small "logical units" could also just be "write pure functions". The complex class hierarchy in the final example could probably be avoided entirely if you were using a language with first class functions. As a bonus, in a functional language the "collaboration units" have probably already been written and tested for you.
1 comments

I'm not sure if the current draft says so, but I talked about how the logical units ought to be "pure functions" most of the time at some point.