I was looking at the ABI dashboard earlier and noticed a couple of notable omissions. Namely, Variadic genetics and generic value parameters. Both of these are also important for c++ interoperability. Will the ABI be declared stable without these features? Or can they be implemented in a backward compatible way? Or will ABI stability be postponed until they’re implemented? Thanks in advance!
These can both hopefully be introduced later. We’re looking into having some level of ability for apps using future Swifts to retrofit runtime support for new language features into older OSes, similar to how the
arclite library works for Objective-C. These two features in particular are things we anticipate leaving room for.
Great to hear that you’re looking ahead to these problems, even if they aren’t the current priority.
I remember that when Java added generics, they decided that maintaining binary compatibility with previous versions was a design constraint. That was the primary reason they decided to type-erase all the generics at runtime. As it turned out, Java 1.5 broke bytecode compatibility anyway, but by the time that became clear they’d already designed and reviewed the compile-time-only generics design, so they shipped it anyway. Java is still paying for that history.
Swift being as mature and popular as it is while still having notable gaps in its type system makes me nervous about history rhyming with itself here.