4 ms·
The operator exists. I can use it today, without exiting the type system, both in Python (limited to only unpacking one tuple type) and Typescript (not limited)
by Timon3 3y ago
The operator exists. I can use it today, without exiting the type system, both in Python (limited to only unpacking one tuple type) and Typescript (not limited). Why do you keep claiming this to be impossible, when it already exists right now?
It's also in no way a special case in TS, the type system supports many things you need dependent types for. Maybe read up on it before you claim it can't do these things?
- corethree 3y agoGreat. Define the concat and intersection function. Do it in python and ts. That is your claim prove it. >Maybe read up on it before you claim it can't do these things? Maybe don't be rude. If I'm wrong I'm wrong. But if you say something like this you need to back up your words. You "read" it. So prove it.
- Timon3 3y agoI defined the concat function in TS and Python below: https://news.ycombinator.com/item?id=38391702 https://news.ycombinator.com/item?id=38391702 Now, obviously Python doesn't support it due to a restriction in the TypeVarTuple PEP, which is the literal entire point of everything I have written. But what more are you asking for? What more do you want as an example? I am not going to touch the intersection function, as I haven't made any claims in that direction.