What are the disadvantages of naming things alphabetically?
- by JoJo
Let me give you an example of how I name my classes alphabetically:
Car
CarHonda (subclass of Car)
CarHondaAccord (subclass of CarHonda)
There are two reasons why I put the type of the class earlier in its name:
When browsing your files alphabetically in a file explorer, related items appear grouped together and parent classes appear above child classes.
I can progressively refine auto-complete in my IDE. First I type the major type, then the secondary type, and so on without having to memorize what exactly I named the last part of the thing.
My question is why do I hardly see any other programmers do this? They usually name things in reverse or some random order. Take the iOS SDK for example:
UIViewController
UITableViewController
What are the disadvantages of my naming convention and the advantages of their convention?