I think I'm one of the random cases that prefer alphabetical lists.
First of all, my experience was that grouping methods together “semantically” tend to be temporary. Now, if we are talking about grouping them by volume / visibility, this is another thing. But then, if a member changes its scope, you must fork out to move the member to save the current code. I don’t want to waste time shuffling the code to watch this.
I am also not a big fan of the regions. When properties and methods are grouped by volume, they tend to scream out for an application in a region. But attached code in collapsing regions tends to hide poorly written code. As long as you don’t need to look at it, you don’t have to worry about how to reorganize it to make it supported.
So, I prefer alphabetical organization. It is simple, direct and accurate. I have no temptation to attach groups to the regions. And since the IDE makes it easy to move on to defining a function or property, the physical layout of the code is controversial. It used to be that you wanted people to focus on your public members first. Modern IDEs make this a largely pointless argument in favor of area-based layouts.
But the biggest advantage in an alphabetical layout is this: printed code samples during code reviews. And I use a lot of them. This allows you to quickly find a function or property. If you've ever had to wade through a lot of code to find a function or property when things weren't just in alphabetical order, you'll find out what I'm talking about.
But, as they say, these are my subjective views on this topic. Your mileage may vary.
source share