Hacker News new | ask | show | jobs
by chlorion 946 days 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++.

1 comments

Typescript 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/

[0] https://www.typescriptlang.org/play?#code/C4TwDgpgBAglC8UDaA...

Wow this is very cool thanks for sharing!
You're welcome! That's why I'm very excited about Typescript, the system is very powerful :)