Updating the Embedded Swift vision

Hello Swift Community,

The Language Steering Group has approved an update to the Embedded Swift vision. The specific changes can be seen in this pull request.

The original Embedded Swift vision took a fairly hard stance that certain features (such as metatypes and existentials) and aspects of the generated code (such as type metadata) would never be present.

As Embedded Swift has evolved, the philosophy has shifted: instead of outright prohibiting these features entirely, they are now available in Embedded Swift with an implementation model that only pays the cost of these features when they are actively used: existentials are permitted, and generate type metadata to support them, but that type metadata is minimal and only emitted for those types that are placed inside an existential. This approach makes Embedded Swift more elastic, because much more of the full feature set of Swift is available to be used in places where the abstractions are worth their cost (in performance / code size / etc.).

This update also revises the list of Embedded Swift restrictions to match those restrictions that are dictated by the compilation model. Essentially, they all stem from the lack of unspecialized generics and the choice not to emit comprehensive metadata, which are the central aspects driving Embedded Swift.

Thank you,
Doug Gregor
LSG Member

26 Likes