Readit News logoReadit News
MichaelArnaldi commented on Zod: TypeScript-first schema validation with static type inference   zod.dev/... · Posted by u/tosh
skrebbel · a year ago
Like Java, you can write Haskell in any language but that doesn't mean it's always a good idea.
MichaelArnaldi · a year ago
Which is why our principle with Effect is NOT to port Haskell. For example we don't use Typeclasses which are big in haskell, we lean heavily on variance which is not in Haskell. It's an ecosystem though to write production-grade TypeScript, not Haskell in TypeScript
MichaelArnaldi commented on Zod: TypeScript-first schema validation with static type inference   zod.dev/... · Posted by u/tosh
morbicer · a year ago
I feel like Effect is today's Ramda. So cool but it's going to be regretted by you and people coming after you in few years. Me and my team reverted to more stupid code and we are happier.
MichaelArnaldi · a year ago
Don't judge Effect based on Rambda they have completely different objectives, Rambda focused a lot on abstractions similar to fp-ts, Effect focuses almost exclusively on concrete implementations
MichaelArnaldi commented on Zod: TypeScript-first schema validation with static type inference   zod.dev/... · Posted by u/tosh
williamcotton · a year ago
Why not write your code in F# and compile it to TypeScript using Fable [1]?

This way you can use native language features for discriminated unions, functional pipelines, and exhaustive pattern matching to model your domain instead of shoe-horning such functionality into a non-ML language!

Model your domain in F#, consume it in Python or C# backends and TypeScript frontends. The downside is needing to know all of these languages and run times but I think I'd rather know F# and the quirks with interacting with TypeScript than a library like Effect!

[1] https://fable.io

Deleted Comment

u/MichaelArnaldi

KarmaCake day6April 15, 2024View Original