Should this piece really be coded with inheritance? Wouldn't composition work just fine? On which grounds can the choice be made?
- possibility to omit braces for one-line blocks,
- initialization next to the field declaration (rather than in the constructor),
- for loop (rather than while),
- goto statement (rather than structured programming),
- global variables (see A case against static),
- static methods,
- Long (rather than long),
- struct (rather than classes in C#),
- casts (rather than generics/templates),
- HashMap (rather than Hashtable in Java),
- objects (rather than modules in OCaml),
- decorators as annotations (in Python),
A bit of reductionism
Deaf to YAGNI
- a class UserManager with most methods abstract,
- and a single implementation RemoteUserManager.
DRYing the wrong way
A matter of choice
- literals, such as constants integers,
- compound expressions such as the binary addition of two other expressions.
The two opposite sides of inheritance
- reuse (or factor) common code or data,
- union distinct objects under the same type.
- code composition for the factoring aspect,
- interface inheritance (or simply duck-typing in more dynamic OO objects) for the union aspect,
- and some glue code, mainly to forward calls.