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

That just pushes the problem onto the user. There is lots of well-documented problems with C versioning. Just saying "don't change the size, order, alignment or layout of anything ever" isn't a great option, it can be done (Microsoft has done a pretty good job) but it requires infinite foresight and is very expensive.

Swift allows libraries to naturally evolve while maintaining comparability. Most things that you would expect to work (add a new field) just work. Good luck adding a new field to `jmp_buf`. It's effectively impossible to do in an ABI compatible way. The fact that C's ABI is stable/backwards compatible doesn't help.

Basically a backwards compatible ABI is the absolute minimum requirement for making backwards compatible libraries. Having more options removes heaps of complexity for library authors.



That’s a fair ask but I’m quite okay with that not being solved. Once the building blocks are stable you can build on top of that.




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

Search: