Transitioning from Elm to React: Challenges and Solutions with TypeScript, Vite, and Zod
coming back to the conversation after a few years of doing Elm in production (woo I finally made it into the inner circle!) and now subsequently realizing the React folks with NextJS have dramatically outpaced the Elm ecosystem but NextJS has to take over the entire body so can't be incrementally adopted, which means using TS+vite+React-Router (upgrading to v5) until we port more Elm over.
BUT of course only using those leaves a gaping hole where I used to use pattern matching and decoders, "so I'll pull in Zod and try to keep things a vanilla TS as possible" but then I just pulled in ts-pattern and it's leaving a LOT to be desired (cause it's super slow to compile)...
Which brings me back to the Effect does all this "out of the box" or "all in one" which is VERY enticing but I'm mostly curious how much the type resolution costs at compile time. At build time it's no thing cause vite leverages esbuild under the hood to throw types away. But during development I'm finding leveraging "simpler constructs" to be more typesafe as it seems typescripts inference seems to be able to resolve the more native syntaxes faster than the ts-patterns.
Is this a CPU issue (Dell XPS 13 intel 12th gen i7 1260p)? Or is it that TS is bootstrapped so it just can't be as a fast as Rust-based or simpler type systems under the hood?