<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Moritz's analysis of why breaking changes are so costly for the whole enterprise is so clarifying; I doubt if there is much that we are considering of more importance.<div><br></div><div>Let me know Moritz if I can help with anything.<br><div><br></div><div>Chris<br><div><br><blockquote type="cite"><div>On 28 Sep 2023, at 13:39, Moritz Angermann <moritz.angermann@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr">Simon,<div><br></div><div>Thank you for bringing us this far. I'd be happy to step up to drive this further.</div><div><br></div><div>I will say that I do see the tension you see as well. And I do believe if we come to a conclusion on this stability policy that it will</div><div>make GHC development more rigorous, which I think is a good thing for all of us, not just the consumers of the compiler. I think</div><div>we need to stay mindful that we can still freely experiment on the --std=experimental (or however that flag ends up being named)</div><div>side. I see this whole discussion as leading us towards the language research reactor side of GHC being primarily confined behind</div><div>--std=experimental, and the stability seeking (commercial application?) on the other side.</div><div><br></div><div>I do not yet see how we can end up with the inability to change. We will just have a clearer process for _breaking_ changes. This</div><div>does absolutely not mean we have to end up in a local optimum, or that we can not change. We can!</div><div><br></div><div>Unless someone speaks up who does _not_ want me to drive, this, I'm happy to start driving this discussion (including writing the</div><div>proposals, starting next week).</div><div><br></div><div>Best,</div><div> Moritz</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 28 Sept 2023 at 19:30, Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com">simon.peytonjones@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="auto">Should we have a document (or better spreadsheet?) with a
bullet point for each experimental feature to be considered? I believe
we need to take into account that we can’t end up classifying most of
todays Haskell programs unstable. As such I’d like to propose that we’d
add to each features a counter for how much of hackage (as a proxy for
real world usage) uses the specific feature. </div></blockquote><div><br></div><div>I think that would be a helpful way to "ground" the discussion a bit more. (The spreadsheet should also give a preliminary classification of extensions, at least into stable/experimental.)</div><div><br></div><div>I'm running out of capacity to drive this debate, useful though it is. Does anyone else feel able to drive some of the legwork?</div><div><br></div><div>So far this is all informal committee discussion. The next step would be a GHC Proposal inviting broader feedback from the community. I'm just hoping that by debugging it between ourselves we can side-step some unproductive discussions in that bigger context.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div>
I believe we need to take into account that we can’t end up classifying most of todays Haskell programs unstable <br></div></blockquote><div><br></div><div>There is a tension here. If we say something is "stable" then we have to be super-careful about changing it. (That's the whole point.) And yet if the feature (like INCOHERENT) is a flaky "you are on your own" unsafePerformIO-like feature, I am axious about tying ourselves into an inability to change the behaviour of corner cases. I'm not sure how to resolve this tension.<br></div><div><br></div><div>Simon<br></div><div><br></div><div> <br></div>
</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 28 Sept 2023 at 02:20, Moritz Angermann <<a href="mailto:moritz.angermann@gmail.com" target="_blank">moritz.angermann@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="auto">I think we are moving in the right direction! I do see however the tension rising on (2). And without being clear about (2), I don’t think we can properly agree on (1). We can agree on (1) in principle, but we need to clarify what we consider unstable/experimental, as a precondition to have finale agreement on (1). Otherwise people might agree to (1), only to be surprised by (2). For (3), I’d be happy to try to get my employer to provide resources for the implementation of —std=experimental. </div><div dir="auto"><br></div><div dir="auto">Thusly I believe we should start to build a list of features we consider sufficiently experimental that they should preclude an existing Haskell program from being considered stable. This list for me contains so far:</div><div dir="auto"><br></div><div dir="auto">- Linear Types</div><div dir="auto">- Dependent Haskell</div><div dir="auto"><br></div><div dir="auto">Adam pointed out experimental backend and non-tire-1 platforms. I tend to agree with this, but see this distinctly separate from the language stability (outside of backend specific language extensions, e.g. JSFFI).</div><div dir="auto"><br></div><div dir="auto">Platforms/backends may be experimental but those are (safe for specific lang exts) orthogonal to the Haskell code the compiler accepts.</div><div dir="auto"><br></div><div dir="auto">Should we have a document (or better spreadsheet?) with a bullet point for each experimental feature to be considered? I believe we need to take into account that we can’t end up classifying most of todays Haskell programs unstable. As such I’d like to propose that we’d add to each features a counter for how much of hackage (as a proxy for real world usage) uses the specific feature. </div><div dir="auto"><br></div><div dir="auto">Best,</div><div dir="auto"> Moritz</div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 27 Sep 2023 at 10:35 PM, Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com" target="_blank">simon.peytonjones@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail_default" style="font-family:tahoma,sans-serif">
it's essential that we continue to have these discussions to ensure
we're making the best decisions for the project and our community. <br></div></blockquote><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Yes exactly! Its tricky and nuanced; hence trying to articulate something in a concrete doc, so we are all on the same page (literally!).</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail_default" style="font-family:tahoma,sans-serif">
However, deprecation cycles don't mean we're averse to major changes. It
means we introduce them responsibly. When we believe a superior design
is possible, we can start a deprecation process to transition towards
it.
</div></blockquote><div><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">I have tried to make this explicit in Section 4. See what you think.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">I think there are three phases</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><ol style="font-family:tahoma,sans-serif"><li style="font-family:tahoma,sans-serif">Agree this document. Is it what we want.</li><li style="font-family:tahoma,sans-serif">Categorise extensions into stable/experimental, and identify experimental language features.</li><li style="font-family:tahoma,sans-serif">Implement --std=experimental (Section 6).</li></ol><div style="font-family:tahoma,sans-serif">(1) is what we are doing now. (2) will be some work, done by us. (3) is a larger task: it will require significant work to implement, and may impose unwelcome churn of its own. But that should not stop us doing (1) and (2).</div></div></div><div dir="ltr"><div style="font-family:tahoma,sans-serif" class="gmail_default"><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">Simon<br></div><ul style="font-family:tahoma,sans-serif"><li style="font-family:tahoma,sans-serif"><br></li></ul></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 27 Sept 2023 at 10:20, Moritz Angermann <<a href="mailto:moritz.angermann@gmail.com" target="_blank">moritz.angermann@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><p style="">Dear Adam,</p><p style="">Thank you for your thoughtful feedback. I understand your reservations, and it's essential that we continue to have these discussions to ensure we're making the best decisions for the project and our community. Let me address each of your points in turn:</p>- Cognitive Overhead for Users:<br>I understand the concern about cognitive overhead due to the inability to remove complexity. However, our primary intention is to ensure a gradual transition for our users rather than abrupt shifts. Introducing changes via deprecation cycles allows users to adjust to modifications over time, reducing the immediate cognitive load. It's a balance between stability and simplicity, and I believe this approach allows us still to reduce complexity.</div><div><br></div>- Maintenance Burden in the Compiler:<br>Maintaining backward compatibility does indeed introduce some overhead. Still, it also encourages a more disciplined and considered approach to changes. With our deprecation cycles in place, it's not that we never remove complexity; rather, we do it in a way that provides ample time for adjustments. This benefits both the development team and the community.<div><br></div><div>- Risk of Local Optimum:<br>This is a valid concern. However, deprecation cycles don't mean we're averse to major changes. It means we introduce them responsibly. When we believe a superior design is possible, we can start a deprecation process to transition towards it. The flexibility and duration of our deprecation cycles can be tailored depending on the severity of the breaking change.</div><div><br></div><div>- Discouraging Volunteer Contributors:<br>I understand that lengthy approval processes can be off-putting. But it's crucial to note that a rigorous process ensures the consistency and reliability of our project. We always welcome and value contributions. Moreover, I believe this stability policy will provide us with clear guardrails on how changes can be contributed.</div><div><br></div><div>I will not disagree on the costs. I do believe though that the costs for _breaking_ changes in the compiler ought to be borne by the people making the change, instead of those who use the compiler (and may not even benefit of those changes that caused breakage). I also see the team maintaining GHC as the one to enforce this; they are the ones who cut the releases. The fact that we may have breaking changes due to _bugs_ is covered explicitly in the stability policy document.</div><div><br></div><div>With my CLC hat on, I have been focusing on the same stability guidelines as well (if it breaks existing code, I have been against those changes without deprecation policies). The issues with the template-haskell, and ghc library are noted. For the ghc library the question will remain if we intent to provide a stable api to the compiler or not. I believe many tools would like to have one, and if we relegate anything unstable to ghc-experimental this might be achieved. For template-haskell this is a bigger concern. Maybe we can collectively come up with a solution that would allow us to provide a more insulated template haskell interface from the compiler.</div><div><br></div><div>However for template-haskell we might also need to look at what exactly caused those breaking changes in the past.</div><div><br></div><div>What this document outlines (in my understanding) is that any experimental feature development can _only_ be visible behind --std=experimental, and the dependency of ghc-experimental. Unless those are given, the compiler should accept existing programs. This should allow us enough room to innovate (everyone is always free to opt-in to bleeding edge features with --std=experimental). I also believe that most of what we have today will need to be treated as non-experimental simply because we did not have that mechanism before. We don't want to break existing programs as much as possible, thus relegating existing features into --std=experimental (except for some fairly clear ones: e.g. Dependent Haskell, and Linear Types?) is not really possible. What we can however do is start deprecation phases for a few versions, moving features we consider highly experimental (or maybe even bad) into `--std=experimental`. Just by having deprecation phases and given the ecosystem enough time to adjust (and provide feedback) we might come to different conclusions.</div><div><br></div><div>As I've also outlined in the document, _if_ GHC was trivially swappable, companies like IOG would _love_ to try new compilers and report back bugs and regressions. As it is today, we can't. Making a large live codebase compatible with 9.8 is a multiple weeks effort. Experimenting with nightlies is technically impossible. _If_ I could setup the built of our software trivial with ghc nightlies, I'd be _happy_ to build the infrastructure out it to provide performance regressions (compilation, runtime, ...) for our codebase and provide the feedback to the GHC team; however I can't. And thus I'm stuck patching and fixing 8.10, and 9.2 today. 9.6 maybe soon, but likely at the point in time where 9.6 is not going to see any further releases, so I can spare trying to even forward port my patches to HEAD. Not that I could even test them with head properly, as our source is not accepted by HEAD. Thus I end up writing patches against old stale branches. This to me is a fairly big discouragement from contributing to GHC.</div><div><br></div><div>Best,</div><div> Moritz</div><div><br><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 25 Sept 2023 at 15:17, Adam Gundry <<a href="mailto:adam@well-typed.com" target="_blank">adam@well-typed.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I'm afraid that I'm somewhat sceptical of this approach.<br>
<br>
A strong stability guarantee is certainly a valuable goal, but it also <br>
comes with costs, which I'd like to see more clearly articulated. Some <br>
of them include:<br>
<br>
* Cognitive overhead for users, because of the inability to remove <br>
complexity from the design.<br>
<br>
* Increasing maintenance burden in the compiler, because of the <br>
additional work needed to implement new features and the inability to <br>
remove complexity from the implementation.<br>
<br>
* A risk of getting stuck in a local optimum, because moving to a <br>
better design would entail breaking changes.<br>
<br>
* Discouraging volunteer contributors, who are much less likely to <br>
work on a potentially beneficial change if the process for getting it <br>
approved is too onerous. (I'm worried we're already reaching that point <br>
due to the increasing burden of well-intentioned processes.)<br>
<br>
Ultimately every proposed change has a cost-benefit trade-off, with risk <br>
of breakage being one of the costs. We need to consciously evaluate that <br>
trade-off on a case-by-case basis. Almost all changes might break <br>
something (e.g. by regressing performance, or for Hyrum's Law reasons), <br>
so there needs to be a proportionate assessment of how likely each <br>
change is to be damaging in practice, bearing in mind that such an <br>
assessment is itself costly and limited in scope.<br>
<br>
It seems to me that the GHC team have taken on board lessons regarding <br>
stability of the language, and the extension system already gives quite <br>
a lot of flexibility to evolve the language in a backwards-compatible <br>
way. In my experience, the key stability problems preventing upgrades to <br>
recent GHC releases are:<br>
<br>
* The cascading effect of breaking changes in one library causing the <br>
need to upgrade libraries which depend upon it. This is primarily under <br>
the control of the CLC and library maintainers, however, not the GHC <br>
team. It would help if base was minimal and reinstallable, but that <br>
isn't a total solution either, because you'd still have to worry about <br>
packages depending on template-haskell or the ghc package itself.<br>
<br>
* Performance regressions or critical bugs. These tend to be a <br>
significant obstacle to upgrading for smaller commercial users. But <br>
spending more of our limited resources on stability of the language <br>
means fewer resources for resolving these issues.<br>
<br>
There's surely more we can do here, but let's be careful not to pay too <br>
many costs to achieve stability of the *language* alone, when stability <br>
of the *libraries* and *implementation* are both more important and <br>
harder to fix.<br>
<br>
Adam<br>
<br>
<br>
On 22/09/2023 10:53, Simon Peyton Jones wrote:<br>
> Dear GHC SC<br>
> <br>
> To avoid derailing the debate about -Wsevere <br>
> <<a href="https://mail.haskell.org/pipermail/ghc-steering-committee/2023-September/003407.html" rel="noreferrer" target="_blank">https://mail.haskell.org/pipermail/ghc-steering-committee/2023-September/003407.html</a>>, and HasField redesign <<a href="https://mail.haskell.org/pipermail/ghc-steering-committee/2023-September/003383.html" rel="noreferrer" target="_blank">https://mail.haskell.org/pipermail/ghc-steering-committee/2023-September/003383.html</a>>, I'm starting a new (email for now) thread about stability.<br>
> <br>
> I have tried to articulate what I believe is an evolving consensus in <br>
> this document <br>
> <<a href="https://docs.google.com/document/d/1wtbAK6cUhiAmM6eHV5TLh8azEdNtsmGwm47ZulgaZds/edit?usp=sharing" rel="noreferrer" target="_blank">https://docs.google.com/document/d/1wtbAK6cUhiAmM6eHV5TLh8azEdNtsmGwm47ZulgaZds/edit?usp=sharing</a>>.<br>
> <br>
> If we converge, we'll turn that into a proper PR for the GHC proposal <br>
> process, although it has wider implications than just GHC proposals and <br>
> we should share with a broader audience. But let's start with the <br>
> steering committee.<br>
> <br>
> Any views? You all have edit rights.<br>
> <br>
> I think that the draft covers Moritz's and Julian's goals, at least that <br>
> was my intention. I have pasted Moritz's last email below, for context.<br>
> <br>
> Simon<br>
> <br>
> <br>
> ========= Moritz's last email ============<br>
> <br>
> Now, this is derailing the original discussion a bit, and I'm not sure <br>
> how far we want to take this. But, regarding @Simon Marlow <br>
> <mailto:<a href="mailto:marlowsd@gmail.com" target="_blank">marlowsd@gmail.com</a>>'s comment<br>
> <br>
> This is one cultural aspect of our community I'd like to shift: the<br>
> expectation that it's OK to make breaking changes as long as you<br>
> warn about<br>
> them or go through a migration cycle. It just isn't! (and I speak as<br>
> someone who used to make lots of changes, I'm now fully repentant!).<br>
> That's<br>
> not to say that we shouldn't ever change anything, but when<br>
> considering the<br>
> cost/benefit tradeoff adding a migration cycle doesn't reduce the<br>
> cost, it<br>
> just defers it.<br>
> <br>
> <br>
> I actually read this as we should stop having breaking changes to begin <br>
> with. And _if_ we<br>
> do have breaking changes, that deprecation does not change the need to <br>
> actually change<br>
> code (cost). As outlined in my reply to that, and @Richard Eisenberg <br>
> <mailto:<a href="mailto:lists@richarde.dev" target="_blank">lists@richarde.dev</a>>'s observation, it<br>
> "smears" the cost. The--to me--_much_ bigger implication of deprecation <br>
> cycles is that we<br>
> _inform_ our _customers_ about upcoming changes _early_, instead of <br>
> _after the fact_. We<br>
> also give them ample time to react. Being by changing their code, or <br>
> raising their concerns.<br>
> Would the Simplified Subsumptions / Deep Subsumptions change have looked <br>
> differently?<br>
> As such I see deprecation cycles as orthogonal to the question if we <br>
> should have breaking<br>
> changes to begin with.<br>
> <br>
> Thus I believe the following:<br>
> <br>
> - Do have a deprecation cycle if possible.<br>
> - Do not treat a deprecation cycle as an excuse. Costs are deferred<br>
> but are as large as ever.<br>
> <br>
> <br>
> should be upgraded to:<br>
> - Preferably _no_ breaking changes.<br>
> - If breaking changes, then with a deprecation cycle, unless technically <br>
> infeasible.<br>
> - An understanding that any breaking change incurs significant costs.<br>
> <br>
> Ocaml recently added multicore support, and they put tremendous effort <br>
> into making<br>
> sure it keeps backwards compatibility: <br>
> <a href="https://github.com/ocaml-multicore/docs/blob/main/ocaml_5_design.md" rel="noreferrer" target="_blank">https://github.com/ocaml-multicore/docs/blob/main/ocaml_5_design.md</a> <br>
> <<a href="https://github.com/ocaml-multicore/docs/blob/main/ocaml_5_design.md" rel="noreferrer" target="_blank">https://github.com/ocaml-multicore/docs/blob/main/ocaml_5_design.md</a>><br>
> <br>
> PS: we should also agree that a "stable" extension should not<br>
> require dependencies on ghc-experimental. To become stable, any<br>
> library support for an extension must move into `base`.<br>
> <br>
> <br>
> This seems like a good idea, however I still remain that _experimental_ <br>
> features should not be on-by-default in a stable compiler. Yes, ideally <br>
> I'd not even see them in a stable compiler, but I know this view is <br>
> contentious. The use of `ghc-experimental` should therefore be guarded <br>
> by `--std=experimental` as Julian suggested. That is a loud opt-in to <br>
> experimental features.<br>
> <br>
<br>
-- <br>
Adam Gundry, Haskell Consultant<br>
Well-Typed LLP, <a href="https://www.well-typed.com/" rel="noreferrer" target="_blank">https://www.well-typed.com/</a><br>
<br>
Registered in England & Wales, OC335890<br>
<a href="https://www.google.com/maps/search/27+Old+Gloucester+Street,+London+WC1N+3AX,+England?entry=gmail&source=g" target="_blank">27 Old Gloucester Street, London WC1N 3AX, England</a><br>
<br>
_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
</blockquote></div></div></div></div>
_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>ghc-steering-committee mailing list<br>ghc-steering-committee@haskell.org<br>https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee<br></div></blockquote></div><br></div></div></body></html>