Most active commenters

    ←back to thread

    Zod v4 Beta

    (v4.zod.dev)
    175 points mycroft_4221 | 11 comments | | HN request time: 0.301s | source | bottom
    1. jmull ◴[] No.43668500[source]
    > Zod v3.0 was released in May 2021...

    v3 didn't last four years. Can we expect much different from v4?

    If you're migrating your zod 3 code, I'd migrate to something more stable and long-lived than v4 is likely to be -- unless you want to be going through it all again in a few years (and yet again a few years after that, etc).

    I don't blame the maintainers (I assume they don't have a fat support and maintenance contract)

    But developers need to go in with their eyes open when it comes to adopting these throw-away libraries and frameworks.

    replies(6): >>43668608 #>>43668626 #>>43668628 #>>43668634 #>>43668636 #>>43668646 #
    2. Swizec ◴[] No.43668608[source]
    > But developers need to go in with their eyes open when it comes to adopting these throw-away libraries and frameworks.

    For contrast: My entire company is less than 4 years old and any code from 6 months ago feels old because things (in a business requirements sense) change so fast. Zod lasting 3 years is fine.

    Although I do wish v4 came a little sooner because we just started using Zod a few months ago.

    3. quink ◴[] No.43668626[source]
    I didn’t exactly see a litany of breaking changes here…

    In fact, zod is one of the leading forces behind this: https://github.com/standard-schema/standard-schema

    A major version increase in four years doesn’t exactly scream “throw-away” to me.

    4. zamadatix ◴[] No.43668628[source]
    Zod has only been around as 1.0 since 2020, so it's probably not a project with enough history you'd have been interested in for many more years yet anyways.

    Of course the bigger question here for most is how large are the breaking changes, not if there is a decade between them.

    5. ymhr ◴[] No.43668634[source]
    This seems unnecessarily cynical, 4 years is a pretty long time to go between major versions for a library like this, and if you look at the breaking changes they're not exactly severe. This isn't a React Router situation where you need to re-write your whole app.

    > I don't blame the maintainers (I assume they don't have a fat support and maintenance contract)

    What's the implication here?

    6. motoxpro ◴[] No.43668636[source]
    So what you're saying is that people need to be aware of software being an iterative process and that maintainers of libraries can't know in advance all the things that might come up in 4 years time?

    I don't know of any software that doesn't have these problems. Either you snapshot a thing and never do updates or you continually update it and have things change.

    The update causes almost 0 breaking changes. I don't think this classifies as a "throwaway" library.

    7. snide ◴[] No.43668646[source]
    This is a little disingenuous. As far as I know, v3 isn't going anywhere. There's what... weeks until May 2025, which would be four years?

    4 years in JavaScript land is actually pretty long. Zod has a pretty good maintenance record. I don't see how a statement like yours can be made without snark. Calling it a "throw-away" library is pretty brash.

    This looks like a good update that sticks to the formula.

    replies(1): >>43669422 #
    8. pcthrowaway ◴[] No.43669422[source]
    > 4 years in JavaScript land is actually pretty long

    For non-JS developers to get a sense of how long this is, companies have probably migrated from React to Vue to Svelte to Solid and then back to React in this time.

    replies(1): >>43669607 #
    9. dsr_ ◴[] No.43669607{3}[source]
    Did they get any useful work done in that time, or just learn new frameworks? That sounds like a form of hell.
    replies(2): >>43669637 #>>43671244 #
    10. pcthrowaway ◴[] No.43669637{4}[source]
    Of course, they upgraded from React v17 to v19!
    11. sanitycheck ◴[] No.43671244{4}[source]
    Be serious, devs doing only useful work would lead to absolutely massive layoffs.