This is a good, understandable intro. It also avoids the “mystify monads by demystifying monads” trap, admirably. I was skeptical about using a particular library’s interface going in, but I think it really helped make the concepts more clear, and I think it’ll be particularly helpful for JS/TS devs who often learn from examples and interfaces rather than just explanations. It helped clear some fog for me around naming versus concepts, which has in the past prevented me from feeling like I fully grasp the subject.
And I think I kinda-sorta understand now why Promise isn’t a monad, but I still really think it’s hair-splitting.
Kyle Simpson (getify) is a top notch JS/programming educator. His explanations and descriptions are very clear and precise. But man... as much I appreciate his style and content, I still can't get myself to enjoy writing JS after trying to get into it for years at this point. I still appreciate all of his stuff though.
If I had to start writing JS now, tabula rasa, I would feel the same way. For what it’s worth, TypeScript is actually pretty darn good. And it has an absurdly powerful type system (because it has to, to meaningfully represent real world JS usage). Probably too powerful, but it can be a good bit of fun if that’s interesting to you.
If you want to give it another look, I’d start with Deno. TypeScript is supported at runtime with no noticeable cost, it’s standards-based so documentation is accurate, there isn’t a shit ton of legacy stuff to wade through. And the types for stuff you’re likely to interact with are probably reasonably coherent, you probably won’t be interacting with interfaces that accept variadic maybe strings or numbers or callbacks or complex unspecified objects.
4 comments
[ 0.25 ms ] story [ 18.1 ms ] threadAnd I think I kinda-sorta understand now why Promise isn’t a monad, but I still really think it’s hair-splitting.
If you want to give it another look, I’d start with Deno. TypeScript is supported at runtime with no noticeable cost, it’s standards-based so documentation is accurate, there isn’t a shit ton of legacy stuff to wade through. And the types for stuff you’re likely to interact with are probably reasonably coherent, you probably won’t be interacting with interfaces that accept variadic maybe strings or numbers or callbacks or complex unspecified objects.