|
|
|
|
|
by blep_
1446 days ago
|
|
> In the worst case, adding a nongeneric parameter to a function could have the same impact. I've never heard of that happening though. Can you clarify this? I'm reading it as "I've never heard of anyone adding a parameter to a function" and that's so far from my experience that I'm either misreading or you work in a vastly different field than I do. > Now when you add that field to that class, it also has to be generic over that type. Now you need to update all the places where that class was used. Only if you need that to be generic too. If you change an int to a T, and you want to preserve the existing behavior for existing callers, they just call it as f<int>() instead of f(). Languages with good type inference will do that for you without changing the calling code as written. |
|
I'm not really sure what to say at this point really. I think we're miscommunicating somehow. Would you agree that if we are too abstract with our architecture, we'll end up with a brittle and difficult to maintain architecture?