3 ms·
The tuple thing requires variadic generics from my understanding. I don't thing variadic generics support is supported in most statically typed languages. The
by chlorion 3y ago
The tuple thing requires variadic generics from my understanding.
I don't thing variadic generics support is supported in most statically typed languages. The only one I can think of right now that supports this is C++.
- Timon3 3y agoTypescript supports it too (quick example[0]) :) and Python actually as well, but currently you can't unpack two TypeVarTuples in the same type expression: https://peps.python.org/pep-0646/ https://peps.python.org/pep-0646/ [0] https://www.typescriptlang.org/play?#code/C4TwDgpgBAglC8UDaA7ArgWwEYQE4BooBnYXASxQHMBdAKFEigCEFksB7dgGwgEMVC6bHjq0AxuxQkovAFzIhOAsVIUarJABYATIQBEACwhcu7KAHd2uLgBM9dCVOBQs8pB258BURSI0AzXi4iCEIABlF-NBQxYDJJKH9OAB4AFV4oCAAPYAgUGyJkADoS-hAkampCVKxMnLyC4tKUcsqAPgAKOSh0wlcerABKNxKi3qhRmuooAG9aKChcCGA0XBQmot5CUaw6AF9acUlpMVYk9i6+waOpTyLTSg6xQaA https://www.typescriptlang.org/play?#code/C4TwDgpgBAglC8UDaA...