Christopher Horobin (@c_horobin) profile picture
Joined November 2012
Never thought I would see the day this type checks in less than a second 馃く
Always bet on TypeScript! Just ran a perf check on the Go implementation in a massive @tan_stack Router project. Even without JSX (not supported yet), it鈥檚 already 3.3脳 faster than TS 5.8. Promising results! 馃殌
7
1,555
Never thought I would be described in this way. Genius I'd reserve for him. I just like types.
He鈥檚 a genius. I may have designed a lot of the initial architecture, but he鈥檚 the one making things crazy fast and bulletproof. I am now the student of my own library.
2
1
65
8,122
Type level code is just another language to learn. If you're uncomfortable looking at it, you probably don't know it that well
1
24
2,599
Inference still happens, even during generation. You still wait for it.
1
1
1,611
It's like stale vs fresh
1,395
Intersections over Extract for narrowing unions?
1
2
3,436
If you want a compiler to be fast. You can't assume the compiler optimises everything that you do.
3
1,328
I still think those repulsed by advanced TS just haven't done it enough. It's a small and quirky functional language. The great thing is there aren't any side effects you have to worry about
1
1
7
1,979
Has anyone actually used a compiler which is actually much faster than TS?
2
1
749
I've used many languages in my career. I can only think of C maybe. C++ is definitely not fast to compile
1
565
If a package solves a difficult problem then I use it. I don't pull in packages because it reduces boilerplate of simple code most understand
4
544
Here goes a simple example. Firstly transforming a tuple type to a union while concatenating two properties together separated by `/`. While its simple, there is a number of ways to do it
Iterating and creating a union = use a distributive conditional Iterating and creating an object/array = use a mapped type Use recursion if you can't use any of the above
1
2
954
I'm going to start with how I would do it. A distributive conditional feels natural to unions. A truthy conditional check is easy on the compiler and is an easy way to trigger distribution
1
2
108
Over encouraging abstraction, design patterns, oop and fp for learning developers was definitely a mistake. I don't ever remember being encouraged to write simple code
2
303
Iterating and creating a union = use a distributive conditional Iterating and creating an object/array = use a mapped type Use recursion if you can't use any of the above
I like distributive conditional types when I need to iterate over a union to create a new union. Otherwise mapped types are better for iterating and creating objects or arrays
1
1
5
1,570
Easy to compile types is not the same as easy to infer types?
1
299
My thought process here is. TS can cache types but regarding inference it needs to look into a type. Is caching even relevant here if inference is the bottleneck?
247
If only we channelled as much effort into writing efficient types as we do trying to make the fastest bundler
1
2
274
Trying to make something type safe after is always going to be worse
2
239
Looking back. I can't remember how long Suspense has been teased for CSR. I was really excited about it when I first saw it. Its a shame its ended up this way
217
I really want to just use solid more.
167
Using a mapped type to transform a union feels odd to me. Mapped types feel natural to transform objects/tuples
1
183
Distributive conditionals feel more natural to unions
144
I see a lot of type level code that uses tuples in combination with recursion. I'm getting more convinced this is a killer for TS performance
1
1
279
It's probably fine on small scale. But nothing stays small. Large tuples and recursion... Yikes
1
257
Aren't function warmers just faking users without any of the benefits?
240