The most important function in my codebase
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Related videos
The #1 Most Important Brain Nutrient EVERYONE Is Deficient In
Felix Harder
13.3k views
This Is the Most Important Issue in America
StevenCrowder
24.6k views
Opus 4.6 Is The Best Coding Model Ever Made*
Theo - t3․gg
106.6k views
I asked Sam Altman about the future of code
Theo - t3․gg
71.2k views
Here’s The MOST IMPORTANT Document In Epstein Files Release!
The Jimmy Dore Show
139.2k views
If you write code, please watch this.
Theo - t3․gg
78.0k views
Is gpt-5.1 the best code model ever?
Theo - t3․gg
63.2k views
The Most Important ChatGPT Feature You're Not Using (it's FREE now)
Futurepedia
58.9k views
Vite costs money now? wtf is Vite+
Theo - t3․gg
71.4k views
10 Most Important Decisions in Life
Valuetainment
334.2k views
Top Comments (10)
Go developer: This is how Go does it. Rust developer: No, Go doesn't do it right, this is the Result pattern from Rust. You need strong types for this to work. Haskell developer: No, Rust doesn't do it right. This is just the Either pattern. Haskell's do notation allows you to "bind" functions together much cleaner. Computer scientist: No, Haskell stole that from category theory—it's just a monad and Kleisli composition in disguise. Mathematician: No, you're overcomplicating this, monads are just monoids in the category of endofunctors.
The neverthrow paradigm API-wise looks very similar to how Rust does it
I think it’s super cool that you are not afraid to show that you’re still learning and there’s loads of stuff you don’t know that you would like to learn.
We tried similar things to what effect is doing in our c# codebase. Honestly, it slows down productivity to a halt. Neverthrow or whatever the golang has is the only way to stay productive. We went back to something that resembles Neverthrow in our app and it's been a bliss since.
This is re-discovering FP the long route (still valuable though). I know theo is aware of effect library though, you are just a couple of steps away from re-discovering unary functions and then composability is unlocked with pipes. JK He mentioned effect later BASED
This channel is such a good resource, I didn't learn anything about web development or real hands on full stack stuff in university, but this year i've gone from not knowing any JS to writing my own full stack apps with Next.js and TypeScript and I've been learning new design patterns every day
I was building a cli app and thought to myself how much I loved the way rust has result and started using that pattern, which is very much like this! I like the idea of just making it its own function
So you're advocating to Go-Style error handling :D
Helpful as always. And I like the way you segue into the ads each time. Shows thought.
This is the array version of the tryCatch function which I prefer and is more aligned with the safe assignment operator proposal: type Success<T> = [null, T]; type Failure<E> = [E, null]; type Result<T, E = Error> = Success<T> | Failure<E>; export async function tryCatch<T, E = Error>( promise: Promise<T>, ): Promise<Result<T, E>> { try { const data = await promise; return [null, data]; } catch (error) { return [error as E, null]; } }
Unlock the Data Inside
Turn Videos into Knowledge
- Get FREE 10/day: transcripts, summaries, chats
- Chat with videos, export text & PDF
- $1 free API credit for RAG, chatbots & research
Free forever plan • All features unlocked
Top Comments (10)
Go developer: This is how Go does it. Rust developer: No, Go doesn't do it right, this is the Result pattern from Rust. You need strong types for this to work. Haskell developer: No, Rust doesn't do it right. This is just the Either pattern. Haskell's do notation allows you to "bind" functions together much cleaner. Computer scientist: No, Haskell stole that from category theory—it's just a monad and Kleisli composition in disguise. Mathematician: No, you're overcomplicating this, monads are just monoids in the category of endofunctors.
The neverthrow paradigm API-wise looks very similar to how Rust does it
I think it’s super cool that you are not afraid to show that you’re still learning and there’s loads of stuff you don’t know that you would like to learn.
We tried similar things to what effect is doing in our c# codebase. Honestly, it slows down productivity to a halt. Neverthrow or whatever the golang has is the only way to stay productive. We went back to something that resembles Neverthrow in our app and it's been a bliss since.
This is re-discovering FP the long route (still valuable though). I know theo is aware of effect library though, you are just a couple of steps away from re-discovering unary functions and then composability is unlocked with pipes. JK He mentioned effect later BASED
This channel is such a good resource, I didn't learn anything about web development or real hands on full stack stuff in university, but this year i've gone from not knowing any JS to writing my own full stack apps with Next.js and TypeScript and I've been learning new design patterns every day
I was building a cli app and thought to myself how much I loved the way rust has result and started using that pattern, which is very much like this! I like the idea of just making it its own function
So you're advocating to Go-Style error handling :D
Helpful as always. And I like the way you segue into the ads each time. Shows thought.
This is the array version of the tryCatch function which I prefer and is more aligned with the safe assignment operator proposal: type Success<T> = [null, T]; type Failure<E> = [E, null]; type Result<T, E = Error> = Success<T> | Failure<E>; export async function tryCatch<T, E = Error>( promise: Promise<T>, ): Promise<Result<T, E>> { try { const data = await promise; return [null, data]; } catch (error) { return [error as E, null]; } }