4 ms·
I almost forgot: generic type variables are used very little outside of generic libraries. We have a 20KLOC codebase which doesn't use type variables at all and
by spion 11y ago
I almost forgot: generic type variables are used very little outside of generic libraries. We have a 20KLOC codebase which doesn't use type variables at all and has only a single in-house written dependency [1] that declares functions with type variables.
note: This is about declaring generics, not using them. You'll still have to write Array<string> and Promise<MyType>, thats true. But its hardly any different from ArrayOfString or PromiseOfMyType in terms of readability.
If I may be so bold, I'd really encourage you to give it a spin. You just might find that your fears about readability are exaggerated.
[1]: https://github.com/doxout/promise-observer https://github.com/doxout/promise-observer
- jamra 11y agoI didn't catch this at the time, but I will take a look. Thanks.