Question

It's common to use '-able' as a suffix for interfaces e.g.

Serializable Printable Enumerable Drinkable Shootable Rotatable

I was thinking that 'Can-' might better because it may be more descriptive. Yes, it is more wordy and it adds noise to the interface name. In particular, passive verbs can be used.

E.g. 1 does Shootable mean that the object is able to shoot (a gun might implement this), or does it means that it can be shot at (a target board might implement this). With the 'Can-' prefix, the former would be "CanShoot" and the latter would be "CanBeShotAt" or "CanShootAt".

E.g. 2 A document 'CanBePrinted' and a printer 'CanPrint'

Or, should we stick with '-Able' and let the documentation provide the context?

Any opinions.

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top