(unless you really override Object.equals(), of course). I've stumbled upon a rather curious Stack Overflow question by user Frank: Why does Java's Area#equals method not override Object#equals? Interestingly, there is a Area.equals(Area) method which really takes an Area argument, instead of a Object argument as declared in Object.equals(). This leads to rather nasty behaviour, as … Continue reading Thou Shalt Not Name Thy Method “Equals”
Writing good APIs is hard. Extremely hard. You have to think of an incredible amount of things if you want your users to love your API. You have to find the right balance between: Usefulness Usability Backward compatibility Forward compatibility We've blogged about this topic before, in our article: How to Design a Good, Regular … Continue reading You Will Regret Applying Overloading with Lambdas!
Overloading methods is a strong concept in API design, especially when your API is a fluent API or DSL (Domain Specific Language). This is the case for jOOQ, where you often want to use the exact same method name for various means of interaction with the library. Example: jOOQ Conditions package org.jooq; public interface Condition … Continue reading Overload API methods with care