For the sake of simplicity, I never implement custom types just for the sake of readability. I.e., I don't encapsulate int, string, decimal, and so on. This is because I find the cost being too high when writing, maintaining, and (OR) mapping all these types.
What I've just started doing in order to achieve the same level of readability, is using aliases like so:
using Birthday = DateTime;
using PersonId = Int32;
before the class declaration, but after the namespace declaration (so that one doesn't have to fully qualify the type names).
For complex generic types, the readability increases even more IMHO:
using StrangeDictionary = IDictionary<int, KeyValuePair<string, decimal>>;
/Martin
Showing posts with label readability. Show all posts
Showing posts with label readability. Show all posts
2010-02-10
Subscribe to:
Posts (Atom)