User activeUser
…you’ll always know that `activeUser` contains a User value – something that might have an `Id` property. And the convention is enforced by the language, so it’s easy to communicate. These semantic distinctions are very useful, I agree. var intValue = 3;
…I separate the conventional prefix with a space: int value = 3;
…so now my co-workers don’t need to remember the convention – it’s enforced by the language. public static IEnumerable<TR> SelectNotNull<T, TR>(
this IEnumerable<T> source,
Func<T, TR> fn)
where TR : class // …and the nullability of TR is tracked by the compiler
public static IEnumerable<TR> SelectNotNull<T, TR>(
this IEnumerable<T> source,
Func<T, Nullable<TR>> fn)
where TR : struct
This is an allowable overload.
Smarter people than you and I have thought about this problem and come to the opposite conclusion: https://en.wikipedia.org/wiki/Lindy_effect