Instead of introducing Length type, I believe you could just access length property on the array, like this: [...OfLength, ...OfLength]['length']. Cool video BTW!
I rewrite and test all code in video myself and also tried your point instead of using Length type we can use the length propery of an array by doing that way we get an type error in the Sum type (? Sum) informing Type 'Add' does not satisfy the constraint 'number'. btw great point 😊
can we do it half-way like having a type of certain number[] and then somehow instantiate it and reduce to a sum? (I want to get an answer to advent 1 finally)
Awesome video! Although it's really interesting and fun as an exploration of a proof of concept, it was very had to watch this and not puke. TypeScript is so toxic, bloated and unintuitive that it feels absolutely disgusting. This is like turing complete concentrated pointlessness. It's a very curious concept, like, how far can we stretch this monstrosity? I'm still trying to get my head around this, it feels like a coding horror movie. Thanks.
Instead of introducing Length type, I believe you could just access length property on the array, like this: [...OfLength, ...OfLength]['length'].
Cool video BTW!
I rewrite and test all code in video myself and also tried your point instead of using Length type we can use the length propery of an array by doing that way
we get an type error in the Sum type (? Sum)
informing
Type 'Add' does not satisfy the constraint 'number'.
btw great point 😊
this messes with my brain ICANT
This is the most absurd TS video of all time and I love it.
This is the such refreshing dev content. Really like your approach and style
Love these examples of "just because you can, doesn't mean you should" 10/10
You Are The best man! Welcome back. Looking forward to more content🤛
Glad you're back! Hope you're doing all good 🙂
This is awesome. I wonder if the type system could ever become as powerful as that in Idris? 🤔😜
What in the actual fuck is that 😮
This is wicked
can we do it half-way like having a type of certain number[] and then
somehow instantiate it and reduce to a sum?
(I want to get an answer to advent 1 finally)
Could you consider this functional programming?
Now I wanna try doing day 1 part 2 with types. Or day 2. probably not 3 though, since it's a 2D problem, would be hard with just types.
Complex, will ask chatgpt to explain this later
Been waiting for a new vid to drop. So glad I was doomscrolling
Amazing!
great video
just wow. types only form beginnign to end
holly molly dude
🤯
Awesome video! Although it's really interesting and fun as an exploration of a proof of concept, it was very had to watch this and not puke. TypeScript is so toxic, bloated and unintuitive that it feels absolutely disgusting. This is like turing complete concentrated pointlessness. It's a very curious concept, like, how far can we stretch this monstrosity? I'm still trying to get my head around this, it feels like a coding horror movie. Thanks.