I'd like to talk about something which has been bugging me for a while. Apologies for not doing it sooner, but recent events have brought this to my mind again and I think we should discuss it.
For Swift 5.0, the Foundation team totally redesigned the
Data type and did not put it up for review, in complete contradiction to their own guidelines for contributing:
The interface of Foundation is intended to be both stable and cross-platform. This means that when API is added to Foundation, it is effectively permanent.
It is therefore critical that any code change that affects the public-facing API go through a full
They didn't do that. Besides the possible improvements we as a community may have been able to suggest, they introduced things like the
ContiguousBytes protocol which I feel is very likely to be duplicated by the standard library at some point (in fact, it already is - there's an internal
_HasContiguousBytes protocol which does exactly the same thing).
I mentioned this when I happened to spot the PR for the new Data design, and was told by @itaiferber that only standard library stuff needs to go through
swift-evolution. This implies that Apple can make whatever changes they like to Foundation's public API. I mentioned it again during the recent review for
ContiguousCollection, with the hope that we would hoist the protocol to the stdlib before ABI stability kicked in, and was just ignored. I accept that perhaps I should have pressed the issue a bit more.
In any case, experiences like this severely diminish my enthusiasm for contributing to this project. I think we need to do better in future.
As a first step, we need to reassert
swift-evolution's authority over the Foundation project. When Apple made it a part of the open-source project, my understanding was that they were accepting that the community would have a say in future non-Darwin-specific public APIs. Is that not the case?