[ghc-steering-committee] Please review #220: QualifiedImports, Shepherd: Simon M

Simon Marlow marlowsd at gmail.com
Thu Sep 19 18:02:55 UTC 2019


The bigger question here is: are we happy to admit extensions that fork the
language? Simon appears to be saying that he doesn't mind. I'm strongly
against a fork, unless it has a clear migration path and an endpoint.

Cheers
Simon


On Tue, 17 Sep 2019 at 23:56, Simon Peyton Jones via ghc-steering-committee
<ghc-steering-committee at haskell.org> wrote:

> I agree with Arnaud that defaults are important: switching from opt-in to
> opt-out for organ donation, and for pension contributions, has had a huge
> effect.
>
>
>
> Suppose, as in the above examples, we had a consensus that
> import-qualified-by-default was the way we wanted Haskell to be.  Then we’d
> just be discussing how to switch over, what the deprecation strategy is,
> how many compiler releases to allow etc.  Controversial as it was, the
> Foldable thing was like this.
>
>
>
> But that’s not the case here.   We are not discussing a change to the base
> language, but a language extension that you can choose to use, or not.  So
> it remains a local coding style choice: “in our company we always use `{-#
> LANGUAGE QualifiedImports #-}` “.  But that really isn’t significantly
> different from saying “in our company we always use `import qualified`”.
> Yes, you can put the former in your .cabal file – but you could equally use
> HLint to enforce qualified import.
>
>
>
> I’m still not persuaded that this small change in convenience is enough to
> add an extension for.   As I say, it’d be different if there was a
> consensus that we wanted to change the base language, and migrate everyone
> to the new default.
>
>
>
> Simon
>
>
>
> *From:* ghc-steering-committee <ghc-steering-committee-bounces at haskell.org>
> *On Behalf Of *Richard Eisenberg
> *Sent:* 17 September 2019 22:04
> *To:* Spiwack, Arnaud <arnaud.spiwack at tweag.io>
> *Cc:* ghc-steering-committee at haskell.org; Joachim Breitner <
> mail at joachim-breitner.de>; Sandy Maguire <sandy at sandymaguire.me>
> *Subject:* Re: [ghc-steering-committee] Please review #220:
> QualifiedImports, Shepherd: Simon M
>
>
>
> I think Arnaud's is an effective argument. It has not changed my opinion
> of this proposal (I'm still against), but it's moved the needle a bit for
> me. What it does suggest is a feature in HLint (if it doesn't already
> exist) that encourages this behavior. Putting this in HLint allows
> individuals and organizations to experiment with enforcing this style,
> perhaps building up further experience for retrying this in the future.
>
>
>
> After writing the above, I talked to Arnaud, and he pointed out a deadly
> flaw in this plan: even if qualified is the default, it might sometimes be
> nice to import unqualified. In the proposal, this is done via the
> unqualified keyword. But without this proposal, there would be no way to
> signal to HLint that an import is meant to be unqualified. So perhaps a
> much more modest proposal allowing (but not requiring) users to write
> `unqualified` in import statements would be worthwhile. This keyword would
> always be redundant today, but it might feasibly be a way forward here.
>
>
>
> Full disclosure: my immediate instinct would be to be against the
> "unqualified" proposal, but it wouldn't be a fork of the language (unlike
> the current proposal). Perhaps others could convince me otherwise.
>
>
>
> Richard
>
>
>
> On Sep 17, 2019, at 7:52 AM, Spiwack, Arnaud <arnaud.spiwack at tweag.io>
> wrote:
>
>
>
> Dear all,
>
>
>
> As one of the author of this proposal. I am, unsurprisingly, against
> rejecting it. Though it seems I'm rather in a minority here, let me add one
> last argument to try and sway the general opinion. Being understood that
> being an author, this argument cannot, in any way be considered as “a vote”
> or any such thing.
>
>
>
> Human psychology is powerful. As it happens, we have a very strong
> tendency to choose whatever course of thought or action requires the least
> mental effort. Defaults require very little mental efforts, so we naturally
> will gravitate towards default. This is why, for instance, almost every
> Swedish worker is part of a union, while almost every French worker isn't:
> in Sweden, unionising is opt-out, whereas in France, it's opt-in. That's
> also why putting apples in front of sweet deserts in a school restaurant
> will result in more children eating fruits rather than cakes.
>
>
>
> Back to our case: the overwhelming majority of Haskell packages are
> designed to be used unqualified (and also do almost all of their imports
> unqualified). Now, either unqualified import are really that much better,
> or the default has an enormous influence. As I previously mentioned, in
> Ocaml, a fairly similar language, qualified is the default, and almost
> every libraries are designed for qualified imports, and import their
> modules qualified. So I'd wager it's the default.
>
>
>
> As a software architect, I do actually spend a bunch of my code reviews
> saying: you should import qualified. It would be a much more effective and
> powerful message to simply set the default imports as being qualified in my
> projects. For me, the change in this proposal would really be a very
> significant change.
>
>
>
> Now, the committee may decide that this is still not worth the confusion
> implied by having two incompatible syntactic conventions out there. That's
> entirely fair! I just don't want anybody to walk out of this conversation
> with the feeling that this proposal is an inconsequential stylistic change.
>
>
>
> /Arnaud
>
>
>
> On Mon, Sep 16, 2019 at 2:04 PM Sandy Maguire <sandy at sandymaguire.me>
> wrote:
>
> I'm happy with your reasoning, Simon, and am also in favor of rejection.
>
>
>
> On Mon, Sep 16, 2019 at 9:23 AM Simon Marlow <marlowsd at gmail.com> wrote:
>
> Dear steering committee -
>
>
>
> The discussion following my earlier suggestion to reject the proposal has
> petered out. Taking into account the discussion, it still seems to me that
> we should reject the proposal, so I've posted on the thread to this effect:
> https://github.com/ghc-proposals/ghc-proposals/pull/220#issuecomment-531666589
>
>
>
> Any further comments before we close it?
>
>
>
> Thanks
>
> Simon
>
>
>
> On Fri, 5 Jul 2019 at 08:19, Simon Marlow <marlowsd at gmail.com> wrote:
>
> Dear steering committee -
>
>
>
> I am inclined to reject this proposal, so as per the new committee process
> I posted the rationale on the github thread:
> https://github.com/ghc-proposals/ghc-proposals/pull/220#issuecomment-508414602
>
>
>
> You may want to consider the proposal and offer opinions while we wait for
> the authors' rebuttal. It's a very simple proposal.
>
>
>
> Cheers
>
> Simon
>
>
>
> On Wed, 3 Jul 2019 at 08:55, Joachim Breitner <mail at joachim-breitner.de>
> wrote:
>
> Dear Committee,
>
> this is your secretary speaking:
>
> QualifiedImports
> has been proposed by Arnaud Spiwack and Guillaume Bouchard
> https://github.com/ghc-proposals/ghc-proposals/pull/220
>
> https://github.com/tweag/ghc-proposals/blob/qualified-import/proposals/0000-default-qualified-import.rst
>
> I propose Simon M as the shepherd.
>
> Please reach consensus as described in
> https://github.com/ghc-proposals/ghc-proposals#committee-process
> In particular, talk to the authors before, if you think this should be
> rejected, and kick off the discussion on Github, following the steps
> described under “Now the shepherd proposes to accept or reject the
> proposal” in the above link.
>
> Thanks,
> Joachim
> --
> Joachim Breitner
>   mail at joachim-breitner.de
>   http://www.joachim-breitner.de/
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
>
>
>
> --
>
> I'm currently travelling the world, sleeping on people's couches and doing
> full-time collaboration on Haskell projects. If this seems interesting to
> you, please consider signing up as a host!
> https://isovector.github.io/erdos/
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20190919/8d9f7fca/attachment.html>


More information about the ghc-steering-committee mailing list