4 ms·
Reformulated "all hope is lost". In terms of ergonomics, I'd say having to recursively discover implementations is quite a stretch from reading a simple switch
by jstimpfle 8y ago
Reformulated "all hope is lost".
In terms of ergonomics, I'd say having to recursively discover implementations is quite a stretch from reading a simple switch block that contains all the possible continuations case-by-case. Psychologically, obstacles like this can prevent you from maintaining the code.
- tigershark 8y agoIn OOP polymorphism is the way. In functional programming, if you have exhaustive pattern matching, then that is the best answer. Given that the examples are in Java 8 I would use without doubt polymorphism.