This makes the code more readable (as KeyType and ValueType are clearer than int and Foo) and easier to copypaste and edit.