[swift-evolution] Swift phases and mis-timed proposals
kremenek at apple.com
Mon Jun 12 19:12:37 CDT 2017
> On Jun 12, 2017, at 12:47 PM, Paul Cantrell <cantrell at pobox.com> wrote:
>> On Jun 12, 2017, at 1:29 AM, Ted Kremenek via swift-evolution <swift-evolution at swift.org> wrote:
>>> On Jun 11, 2017, at 4:47 PM, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
>>> I think having a queue to submit "proposals for eventually", written when the inspiration is there, and having a core team review (say once a month or even once a quarter) of their viability for future Swift directions would be amazingly valuable.
>> This is a good point. I think the concern about a queue is that ideas in it may still be subject to starvation if the queue gets too long. Ideas also can atrophy in their relevance as the language evolves but proposals stay in the queue. It then becomes a delicate matter when closing out old proposals. …
>> The point about understanding “viable for future Swift directions” is key here. Viability really comes down to trajectory for the language. None of us are fully omniscient about what is coming in future releases, but we do have a sense of some of the priorities for the language that we need to tackle, balanced with what **kind** of changes are still acceptable to take into the language depending on the kind of disruption they cause for users, the tools we have to mitigate any pain with those changes, etc.
> This touches on two related concerns I’ve long had about how swift-evolution has worked so far.
> Concern #1 is that we consider proposals in relative isolation, on their own merits. That’s understandable and wise. Without this focus, we’d never reach conclusions about anything. However, this does tilt the process toward greedy optimization as we traverse the language space. I worry that there’s not enough attention to the big picture.
I agree that some of the proposals have felt like steps of a hill-climbing algorithm.
A few thoughts here:
- In contrast to the greedy optimization analogy, the series of manifestos in the Swift 4 timeframe (ABI stability, String, Ownership) are intended to provide an umbrella of design for what will turn out to be related but separate SE proposals. The idea of these manifestos is to chart a direction for design and provide the basis for which the proposals related to the goals of the manifesto will be evaluated.
- Many SE proposals have been about language refinements, which fall into a category of topics that have been part of an ongoing design discussion for Swift for years — including long before Swift was publicly announced. While the proposals may sometimes feel disjoint, their evaluation is not necessarily so. Often for me proposals relate (directly or indirectly) to design discussions from previous versions of Swift (including pre-Swift 1) that help provide broader optics when evaluating the merit of the proposals. Sometimes when a proposal comes back for revision it incorporates those optics.
- Sometimes (often?) refinements aren’t part of a grand design. They evolve in the mind space from usage of Swift. In other words, greedy optimization is sometimes just a natural way discussion and design happens. The question in my mind is when these concerns come up should we throttle individual proposals and take more time to take a broader view? Maybe that’s the answer. Having been in discussions in the Core Team meetings I can say that sometimes it is clear there is a broader topic to be discussed, and other times it isn’t.
> Concern #2 is that it’s hard to know what to do with a proposal when the ideal answer is “we need to see how it plays out in practice and then decide whether to accept it.” Theoretical discussion untempered by practical prototyping is a great way for a group to talk itself into a bad idea. (This will especially be a problem with future work to build out generics & existentials.)
I agree. Do you have specific thoughts here on what could be done differently?
> Swift is already a very featureful language, and not always in a good way. A new feature that makes good sense in the context of a particular problem may make less sense when we consider the totality of its effect on the programmer model: its mental burden, its unforeseen interactions, its surprising pitfalls. How often do we reviewers give only a perfunctory answer to “Does this proposal fit well with the feel and direction of Swift?” How often _can_ we give anything but?
> The net result is that IMO we tend to over-favor narrow solutions that solve very specific problems, and under-favor simpler, more general features that are good-enough solutions to _many_ problems at once — not as nice for any _one_ of those problems in isolation, but nicer to work with taken as a whole.
> The Great Access Modifiers Wars and the recent fussing of SE-110 fallout are good examples of these problems.
I think the Great Access Modifier Wars benefit from a lot of hindsight 20/20. The question in my mind is how do we recognize when we are entering into such a topic again, and what steps do we take “consider the totality of its effect on the programmer model”, as you say? I have to say that we did *try* and consider the totality, or at least we thought we did, when we discussed the changes to access control. Further, it is sometimes hard to evaluate the full implications of a design change until they are unleashed. Myopia is always a risk in designing the ideal solution, with imperfect information or imperfect reasoning playing a factor in suboptimal decisions. Many domains rely on iteration and refinement as a natural part of making progress given the limited capacity to understand everything up front. Language design really is no different, even though the stakes are sometimes higher because language design choices are so fundamental.
> The work on ABI stability is perhaps a good model for non-greedy planning guided by a coherent big picture.
Indeed. The same goes for Ownership and String.
> Do these musings make sense? I don’t have any clear answers, but hope the observations are helpful.
They do — and I appreciate them!
I do wonder how to apply some of these suggestions. With big efforts — like revising String — we know from the onset that there is a body of problems that need to be tackled and considered together. Not everything that pops up on swift-evolution is like that. For those topics that pop up on swift-evolution as an observation that something in the language isn’t as awesome as we want it to be, should we apply resistance to taking changes to provide more time to consider the broader context? Specifically, *how* do we make design decisions on such proposals, as you put it, less greedy? Further, is this a rampant problem in your mind or a reaction to some decisions that went badly and had to be later re-considered? It’s easy to reflect on what hasn’t worked well, but any way we change the process has tradeoffs on what it yields.
More information about the swift-evolution