[Haskell-cafe] Monad of no `return` Proposal (MRP): Moving `return` out of `Monad`
gershomb at gmail.com
Mon Oct 5 15:09:23 UTC 2015
On October 5, 2015 at 10:59:35 AM, Bryan O'Sullivan (bos at serpentine.com) wrote:
> I would like to suggest that the bar for breaking all existing libraries, books, papers,
> and lecture notes should be very high; and that the benefit associated with such a breaking
> change should be correspondingly huge.
My understanding of the argument here, which seems to make sense to me, is that the AMP already introduced a significant breaking change with regards to monads. Books and lecture notes have already not caught up to this, by and large. Hence, by introducing a further change, which _completes_ the general AMP project, then by the time books and lecture notes are all updated, they will be able to tell a much nicer story than the current one?
As for libraries, it has been pointed out, I believe, that without CPP one can write instances compatible with AMP, and also with AMP + MRP. One can also write code, sans CPP, compatible with pre- and post- AMP.
So the reason for choosing to not do MRP simultaneous with AMP was precisely to allow a gradual migration path where, sans CPP, people could write code compatible with the last three versions of GHC, as the general criteria has been.
So without arguing the necessity or not, I just want to weigh in with a technical opinion that if this goes through, my _estimation_ is that there will be a smooth and relatively painless migration period, the sky will not fall, good teaching material will remain good, those libraries that bitrot will tend to do so for a variety of reasons more significant than this, etc.
It is totally reasonable to have a discussion on whether this change is worth it at all. But let’s not overestimate the cost of it just to further tip the scales :-)
More information about the Haskell-Cafe