|
|
|
|
|
by thiago_fm
211 days ago
|
|
Might be my own taste, but except a few of the common and easy to understand structural typing code, I find it sometimes actually make things needlessly complex. I also write lots of Typescript, and the furthest I go is to use 'Omit' and other utility types, but already feel like it's too much. |
|
The overhead argument seems fairly objective to me - clean code with low coupling in C# et al. requires separate definitions of interfaces and implementations, explicit conversion methods between compatible interfaces etc. This adds up over time and makes refactoring pretty annoying.
The tight coupling happens when people don't bother to define interfaces. Suddenly I have to couple class hierarchy to classes from unrelated modules, all so the compiler is happy when I pass structurally equivalent data. To keep my own modules clean I have to add yet more interfaces, conversion methods etc!