what makes you think using generics reduces duplicated code?
Because that is the purpose of generics, as far as I can see. E.g. for my case of Matrix, generics allow me do write code for creation, deletion, row and colums manipulation etc. only once. And that works indeed. I'm just trying to understand where the limits are.