<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_default" style="font-family:tahoma,sans-serif">
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:
</div></blockquote><div><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">Thanks for articulating this.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">I see this doc as the language counterpart of the base-libraries document, where we split `base` and `ghc-experimental`. By splitting in this way, we allow innovation, while placing stronger stability goals on `base`. Stronger, but not unbreakable: I expect base to continue to evolve, e.g. by removing (with deprecation cycles) stuff that is plainly GHC-internal, subject to the CLC. But, as we have seen in the extensive debate that led up to this proposal, it is <i>really </i>helpful to have a clear line between "experimental" and "stable", for all sorts of reasons.</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 we are just doing the same here. Many GHC proposals add a new language feature, guarded by an extension, and are unaffected by the proposal. Others make changes to recently added extensions (Linear Haskell is the poster child example), which we informally regard as experimental and subject to change. But we don't *say* that at the moment... it's all informal. By identifying which extensions are experimental, and which are stable (and subject to higher back-compat goals) we help our users, and ourselves. Just like base vs ghc-experimental.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">I called them "General Rules" because (just like changes to base) I think we will want to break them. But I'm content to be considerably more careful when we break stable extensions than experimental ones.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">=============</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">Template Haskell is a real problem. I don't think we can promise never to change TH syntax, for the reasons you describe. <br></div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">Is it true that many TH users use only splices and quotations, not explicit use of TH data constructors? Those programs should be much more stable. <br></div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">For ones that use TH data constructors I think that prompt (but very routine) maintenance may be needed.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">Simon<br></div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 25 Sept 2023 at 08:17, Adam Gundry <<a href="mailto:adam@well-typed.com">adam@well-typed.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid 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>
27 Old Gloucester Street, London WC1N 3AX, England<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>