|
|
|
|
|
by one_comment
1817 days ago
|
|
Give the types useful names, like everything else. Recently I did a review for a new peer and was pleasantly surprised that they used proper names for generic arguments. At first I stumbled of course, because I wasn't used to generic arguments being longer than a few characters but I think it helped the readability a lot. interface Functor {
<Source, Target> Self<Target> fmap(Self<Source>, Function<Source, Target>);
}
Same code, but you get an additional hint of what's going on. |
|