At this point⦠I think it might be a good idea for us to slow down, catch our breath, and maybe use this time to reset or reboot what direction we want to take these conversations.
What is it we want? I'm not talking about "tactical" things like "this engineer wants a different name" or "this engineer wants a different type" or "this engineer wants a different documentation comment". At a higher level⦠what is it we both want out of this process?
I think if you looked at what we are both trying to do here⦠we would have a lot in common:
- We want Swift to be safe.
- We want Swift to be robust.
- We want Swift to help engineers make great products.
Of course⦠we may very well disagree on details about how we want to accomplish those goals. The good news here is that I can continue assuming good intent. When you and others leave feedback that I disagree with I can continue assuming you are acting in line with our shared goals to make Swift as good as it can be. At that point I would hope we all can reciprocate those vibes: if I disagree with your feedback you can continue assuming I am acting in line with our shared goals to make Swift as good as it can be.
With all that being said⦠I think we can try and think a little more tactically about what is left blocking this pitch from moving forward. There has been a lot of recent activity here this week⦠which is good! I want to try and collect what seem to be the most important "buckets" of feedback I am seeing:
- Defining and documenting semantics. The original proposal offered one generic "template" of header doc comments on
String
and left additional improvements on that template up to the library maintainers that submit and review the concrete implementations on GitHub diffs. The feedback is asking for some more upfront thought here in the design review.
- Adding new types to the proposal. The original proposal focused on what we saw as the highest impact types that would benefit in standard library. The feedback is asking for more types from standard library to be included in this proposal. None of the feedback I have seen here is asking to remove any of the types from the original proposal.
- Changing the name of
isIdentical
.
When I look at these in the other direction⦠I can begin to see the order that I believe we can have the most immediate impact by focusing our discussion:
- Changing the name of
isIdentical
. Debating the name of this function is not impactful if we don't reach any agreement on what types are going to have this new function as part of this proposal.
- Adding new types to the proposal. Because we all agree that the types from the original proposal should be included, debating what new types might be added is not impactful if we don't reach any agreement on how the semantics of the functions on the original types should be defined and documented.
- Defining and documenting semantics. This to me looks like the most important blocker to settle on. Can we agree what semantics are defined and documented by this proposal? My advice is we start here ā working from the types in the original proposal ā and try to keep that discussion going without getting too distracted right this moment on what new types might be added or what a different name of this function might eventually be.
Here are some thoughts I have collected for a discussion about semantics:
The previous pitch introduced a Distinguishable
protocol with an isIdentical
member. We defined a set of types from standard library that would adopt Distinguishable
. Over time we dropped the Distinguishable
protocol idea and went with isIdentical
methods on concrete types without a protocol.
I'm not sure I'm ready to propose going back to a Distinguishable
protocol⦠but there might be value here in expanding our proposal with something like an "informal protocol". This attempts to provide some kind of "unified" value statements about what any concrete type that implements an isIdentical
method publishes as a semantic contract.
The original proposal coupled the semantics of isIdentical
to Equatable
. But this can introduce ambiguity:
String
always adopts Equatable
.
Array
sometimes adopts Equatable
.
Span
never adopts Equatable
.
If we can agree that there should be some kind of basic and consistent semantics that all isIdentical
implementations should communicate maybe then we can turn our attention to the concrete types from the original proposal and how those concrete types might then choose to refine those semantics.
I can offer to update the proposal to include the header doc comments on every type we propose. While I would normally expect review of header doc comments to take place on diff reviews among the library maintainers, I can offer to be more flexible here and open up the design review to include header doc comments. If an engineer has improvements to suggest how we communicate the semantics of isIdentical
on String
or Array
then we can have that discussion here.
One issue here is how the isIdentical
semantics on an Equatable
type might introduce any future problems if that type also adopts Hashable
. I'm not completely sure I understand what was being communicated in the feedback there⦠I would like to hear more about this if anyone can help with some more ideas or examples there.
My preference right now would be to focus our collective efforts on trying to work together through these blockers on our semantics before we move on to discussing additional types or different names. I might choose to prioritize my time responding to feedback that focuses on our semantics while this remains unresolved.
Please let me know if these ideas work for you as a general strategy and framework to help keep us moving forward. Thanks!