Hacker News new | ask | show | jobs
by mercurial 4319 days ago
> A way of specifying an ABI for a packages instead of a version number?

Technically impossible for many languages (have fun figuring out what it would look like in Perl...). And even when it's possible, it's not a guarantee: you can have a semantic change without an ABI change. Cargo, Rust's newfangled package manager, supposes semantic versioning, and I think it's a sane attitude.

1 comments

Stronger and stronger typing makes this ABI guarantee stronger and stronger. Dependent typing could package theorems about the properties of your interface and then ensure that all matches satisfy those properties. You'd like depend upon their theorems to prove things about your own program knowing that nothing can break.
Yes, but something like Idris isn't mainstream. 99% of the languages out there don't allow you to express this kind of invariant.
Certainly, but it's going to become more and more so. The right way to do an API is to expose your invariants. Some day that will be a thing—and the distributed problem will still be here.
That or we will all have to write Javascript in Javascript :)
That or we will all have to write Javascript in Javascript.