A little clarity

Daniel van Vugt daniel.van.vugt at canonical.com
Wed Jul 17 02:53:48 UTC 2013


 > If the suffix is redundant, then please leave it out. If it's not
 > redundant then please stop to think of a better name for your class.

... and if you can't think of a better more solid-sounding class name, 
then reassess the code that uses it. Try to think of a different way to 
approach the problem. Because if you're stuck with highly abstract class 
names, that usually suggests the design which led you to them is not 
quite right.


On 17/07/13 10:48, Daniel van Vugt wrote:
> All,
>
> I see a lot of code landing even now, where classes are named:
>    FooStrategy
>    FooCriteria
>    FooSequence
>    FooMechanism
>    FooBundle
>    FooPackage
>
> These suffixes are all too abstract to help the reader understand what's
> going on.
>
> If the suffix is redundant, then please leave it out. If it's not
> redundant then please stop to think of a better name for your class.
>
> This should result in more readable code, which helps everyone, forever
> more.
>
> - Daniel
>



More information about the Mir-devel mailing list