Recent

Author Topic: Generics without specialization cannot be used as a type for a variable  (Read 3851 times)

Nitorami

  • Sr. Member
  • ****
  • Posts: 378
Re: Generics without specialization cannot be used as a type for a variable
« Reply #15 on: February 24, 2019, 03:56:27 pm »
Quote
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.

jamie

  • Hero Member
  • *****
  • Posts: 3275
Re: Generics without specialization cannot be used as a type for a variable
« Reply #16 on: February 24, 2019, 11:15:46 pm »
it may save you time in coding and key punching, but that is just about it.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018