[ghc-steering-committee] Proposal #302: `\of` (New Shepherd: Simon PJ)
Simon Peyton Jones
simonpj at microsoft.com
Mon Jun 28 10:55:56 UTC 2021
Thanks Vlad. Personally I don't see this as a problem, but my question was only:
| > * Are there any other alternatives you strongly want on the ballot?
I believe you may be saying that you'd like (2) or maybe (3) or maybe both on the ballot as well? Or perhaps some other alternative?
Let me know what you'd like. Then we can proceed to voting on them. But the first thing is to have some clearly-stated alternatives on which to vote.
Thanks
Simon
| -----Original Message-----
| From: Vladislav Zavialov (int-index) <vlad.z.4096 at gmail.com>
| Sent: 28 June 2021 11:20
| To: Simon Peyton Jones <simonpj at microsoft.com>
| Cc: ghc-steering-committee at haskell.org
| Subject: Re: [ghc-steering-committee] Proposal #302: `\of` (New Shepherd:
| Simon PJ)
|
| There's major flaw in options (1) and (4). Consider:
|
| \cases
| X a ->
| -- very long
| -- rhs
| -- that takes
| -- several lines
| Y b -> ...
|
| By the time I get to the `Y b -> ...` alternative, I may have forgotten if
| it's \case or \cases, so I won't know whether to (mentally) parse it as two
| patterns `Y` `b`, or a single pattern `Y b`.
|
| Option (2) solves this with commas:
|
| \cases
| X, a -> ...
| Y, b -> ...
|
| Option (3) solves this with a lambda:
|
| case of
| \X a -> ...
| \Y b -> ...
|
| So in both (2) and (3) there's a clear syntactic indication that parsing
| this alternative differs from normal, unary \case and case of.
|
| Unfortunately, Simon discarded both of these from the vote! So I'm currently
| leaning towards rejecting the proposal, since I can't vote for the options
| that look reasonable to me.
|
| - Vlad
|
|
| > On 28 Jun 2021, at 12:44, Simon Peyton Jones via ghc-steering-committee
| <ghc-steering-committee at haskell.org> wrote:
| >
| > Dear Steering Committee
| >
| > Two weeks ago I asked
| >
| > * Are there any other alternatives you strongly want on the ballot?
| >
| >
| > I got these responses
| >
| > * Joachim, Simon, Alejandro, Arnaud: nothing to add
| > * Vitaly, Eric, Tom, Richard, Vlad: no response I'd love to hear from
| > the five of you, please. I want to get a decision on this, and I can't do
| that if I don't hear from you.
| >
| > Thanks
| >
| > Simon
| >
| >
| >
| > From: ghc-steering-committee
| > <ghc-steering-committee-bounces at haskell.org> On Behalf Of Simon Peyton
| > Jones via ghc-steering-committee
| > Sent: 15 June 2021 13:52
| > To: Joachim Breitner <mail at joachim-breitner.de>;
| > ghc-steering-committee at haskell.org
| > Subject: Re: [ghc-steering-committee] Proposal #302: `\of` (New
| > Shepherd: Simon PJ)
| >
| >
| > | I'd like to reassing shepherding of this one.
| > |
| > | It seems to be clear that we want "something like this", there are
| > | many ways to skin the cat, so it comes down to opinion and what we
| > | need is a decision (or a call to votes). As with anything that's
| > | possibly quite opinionated, it's good to have an authorative voice, so
| in this case, Simon PJ.
| > |
| > | Simon, can you either come up with a "all things considered, I
| > | think this variant is the (narrowly) the best" recommendation or,
| > | alternative, a "please vote on the following options" verdict?
| >
| > OK, to remind everyone
| > * Here is the proposal:
| https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com
| %2FJakobBruenker%2Fghc-proposals%2Fblob%2Fpatch-1%2Fproposals%2F0000-lambda-
| layout.md&data=04%7C01%7Csimonpj%40microsoft.com%7C11e2548cef584a4816480
| 8d93a1e3b84%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637604724423195072%
| 7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwi
| LCJXVCI6Mn0%3D%7C3000&sdata=riZXAyQbv1LLzbiHbPPIPMnXzrFOhtMeuH2SfIje8ls%
| 3D&reserved=0
| > * Here is the discussion:
| > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
| > ub.com%2Fghc-proposals%2Fghc-proposals%2Fpull%2F302&data=04%7C01%7
| > Csimonpj%40microsoft.com%7C11e2548cef584a48164808d93a1e3b84%7C72f988bf
| > 86f141af91ab2d7cd011db47%7C1%7C0%7C637604724423195072%7CUnknown%7CTWFp
| > bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn
| > 0%3D%7C3000&sdata=PqnR%2BWM9RDQkrWCk4ItoZYZMl2z1tCPlVqbG8y2lL70%3D
| > &reserved=0
| >
| > The basic idea is to extend to lambda all the facilities that you get with
| function definitions, especially multiple patterns and guards. This seems
| clearly a good idea, whose only obstacle is syntactic. There are no
| conceptual or specification challenges. The only point at issue is that of
| concrete syntax.
| >
| > The proposal offers four possible syntactic options. After reviewing,
| > I propose to discard (2) and (3) leaving these alternatives
| >
| > * Option (1) \cases { p1 p2 -> rhs1; q1 q2 -> rhs2 }
| > * Lives alongside \case, but allows multiple patterns
| > * Other keywords are possible, but I think it must be a variant
| on \case
| > * Option (4) Same, but use \case as the keyword
| > * Incompatible with existing \case => extended transition
| period, unhappy users
| > * \case { (Just x) -> rhs1; Nothing -> rhs2 } will require
| parens forever, which in the common case of a one argument lambda see
| clunky.
| > * Option (X). Reject the proposal.
| >
| >
| > Personally I favour (1). I'm relaxed about having multiple ways of
| saying the thing (think of let vs where), and I see no harm provided the two
| constructs look and behave the same. I've decided I like \cases precisely
| because it's the plural of \case, which is exactly what is going on.
| >
| > I think we'll end up having to vote on this, which is fine when it's a
| judgement call about syntax. But first:
| >
| > * Are there any other alternatives you strongly want on the ballot?
| > I say "strongly" because I don't want to open up a big new debate... we at
| the stage of trying to narrow options.
| >
| > Thanks
| >
| > Simon
| >
| > _______________________________________________
| > ghc-steering-committee mailing list
| > ghc-steering-committee at haskell.org
| > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail
| > .haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-steering-committee&a
| > mp;data=04%7C01%7Csimonpj%40microsoft.com%7C11e2548cef584a48164808d93a
| > 1e3b84%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637604724423195072
| > %7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6I
| > k1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1QO9LR43LzG3TELp2guWxCH9B0Fqm8v
| > HB%2FgadoRTwQg%3D&reserved=0
More information about the ghc-steering-committee
mailing list