Hacker News new | past | comments | ask | show | jobs | submit login

  > For Swift 4, the primary goals are to deliver on the 
  > promise of source stability from 3.0 on, and to provide 
  > ABI stability for the standard library.
Hm, does this imply that only the stdlib will have the benefit of a stable ABI? IOW, that it won't be possible to distribute compiled artifacts built with different versions of the compiler and expect them to link properly?



I don't think so, it means that the stdlib team will adhere to the requirements for ABI compatibility and the compiler will support this.

Third party vendors will have to adhere to the same requirements to be ABI compatible, because not all changes will be compatible.


Well, how will Swift enforce that nobody outside of Apple distributes libraries that don't break ABI or API?


While a compile can't enforce APIs, the ABI generated by compiler.


The ABI is generated by the compiler in response to the code it is given. If you don't control the code, you can't guarantee an ABI. If you change the types of function arguments -- for example, adding fields to structs that are passed by value -- you will break ABI, even if the compiler doesn't change.


So, for C++, a good document about keeping ABI compatibility: https://community.kde.org/Policies/Binary_Compatibility_Issu...




Applications are open for YC Summer 2019

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

Search: