Hacker News new | ask | show | jobs
by hkarthik 4483 days ago
I feel like showing off some tests would help when the example is this complex. That would give a bit more context in terms of what you're trying to accomplish here.
1 comments

True, the tests do demonstrate what can be accomplished, but that kind of gets back to my point: Any example complex enough to unambiguously warrant the use of a command pattern is going to involve non-trivial effort to learn the context. Asking that effort of someone reading a blog post is a bit much.

Unfortunately, it's easy to dismiss simple examples as not being worth the complexity and demand real examples which can be dismissed because they cannot be easily understood.