(no title)
webdevladder | 10 months ago
I've been evaluating schema libraries for a better-than-Zod source of truth, and ArkType is where I've been focused. Zod v4 just entered beta[1], and it improves many of my problems with it. For such a mature library to improve like this, v4 is treat and speaks volumes to the quality of engineering. But ArkType has a much larger scope, and feels to me more like a data modeling language than a library. Something I definitely want as a dev!
The main downside I see is that its runtime code size footprint is much larger than Zod. For some frontends this may be acceptable, but it's a real cost that isn't wise to pay in many cases. The good news is with precompilation[2] I think ArkType will come into its own and look more like a language with a compiler, and be suitable for lightweight frontends too.
CharlieDigital|10 months ago
I was so shocked by how good this is that I ended up writing up a small deck (haven't had time to write this into a doc yet): https://docs.google.com/presentation/d/1fToIKvR7dyvQS1AAtp4Y...
Shockingly good (for backend)
[0] Typia: https://typia.io/
[1] Nestia: https://nestia.io/
[2] https://kysely.dev/
retropragma|10 months ago
This is because it relies on patching the TypeScript implementation. I'm curious if its approach is even feasible with Go?
udbhavs|10 months ago
surprisedcat|10 months ago
sync|10 months ago
Jaydenaus|10 months ago
epolanski|10 months ago
So...it's a parser. Like Zod or effect schema.
https://effect.website/docs/schema/introduction/
MrJohz|10 months ago
worble|10 months ago
Yes, it unfortunately really does bloat your bundle a lot, which is a big reason I personally chose to go with Valibot instead (it also helps that it's a lot closer to zods API so it's easier to pickup).
Thanks for linking that issue, I'll definitely revisit it if they can get the size down.
notpushkin|10 months ago