benefits of using self type annotations over inheritance