Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you enforce it?

Cargo (rust) considered it, using the vastly more information it has about whether signatures have changed than NPM, but rejected it because you can still make breaking changes without changing a function signature, so why claim to detect it if only a subset can be.



You can get pretty far with a statically typed, purely functional language. For example, Elm's package manager enforces semantic versioning: https://elm-lang.org/

I don't think you can do that with JavaScript.


You can always break an API with the values, however much you do with the types.

Its effectiveness also varies with how much and well types are used - e.g. whether you return `String` or `Url` to begin with.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: