JDK8 and Default methods
←Older revision | Revision as of 11:28, 5 March 2018 | ||
Line 31: | Line 31: | ||
} | } | ||
</source> | </source> | ||
- | however that hurts the [[clarity]] of | + | however that hurts the [[clarity]] of the specified version. When I see an implementation of the interface without the ''visitMinus'' method being overriden, what does that mean? Does that mean that the implementation was written against version 1.0? Or that it has been written against version 2.0, but the '''default''' method implementation is fine? This makes a difference as the [[ClarityOfAccessModifiers|arithmetica example]] demonstrates! |
As such rather create new pure '''interface''' for each version of your language/expressions rather than relying on [[default methods]]. Don't be lazy, don't increase [[fuzziness]] of your [[API]]! | As such rather create new pure '''interface''' for each version of your language/expressions rather than relying on [[default methods]]. Don't be lazy, don't increase [[fuzziness]] of your [[API]]! |