[ghc-steering-committee] Please review #500: Add implicit import proposal, New Shepherd: Simon M.

Iavor Diatchki iavor.diatchki at gmail.com
Wed Aug 31 05:23:49 UTC 2022


Hello,

I am not on the committee anymore but I like reading the discussions while
having a coffee, so I thought I'd chime in with my 2c:   using an `import`
declaration, you get to introduce a shorter qualifier (the `as` clause),
which for me as a programmer is essential---I don't remember the last time
I used a `qualified` import without an `as`, which is what you'd get with
this proposal.

-Iavor


On Mon, Aug 29, 2022, 20:00 Eric Seidel <eric at seidel.io> wrote:

> If the main benefit we expect from this feature is improved development
> productivity (from not having to jump around to insert temporary imports),
> I can think of two ways to restrict the feature to keep most of the benefit
> without dealing with tricky questions like instance imports.
>
> 1a. Never import instances via an implicit import. This limits the
> usefulness somewhat if you're trying to use an overloaded method, because
> you might depend on the instances that would come alongside the method.
> But, it's an easy rule to remember, and our goal is to improve dev
> productivity, not provide a production-grade solution.
>
> 1b. Always import instances via an implicit import. Same argument as
> above, but perhaps more friendly to productivity.
>
> 2. Always warn about implicit imports so they mostly stay out of
> production builds.
>
> On Mon, Aug 29, 2022, at 11:19, Joachim Breitner wrote:
> > Hi Simon,
> >
> > thanks for picking this up.
> >
> > I am similarly torn.
> >
> > Everytime I have to add and then remove Debug.Trace from my import list
> > I am annoyed. And especially for quick scripts etc. having less red
> > tape to go through seems to be an improvement. So I see the benefit. If
> > I’d be creating a programming language afresh, I might be inclined to
> > allow that – a qualified identifier is already quite explicit, after
> > all!
> > (I admit that I still don’t use the latest tooling available, maybe
> > someone using LSP for all their Haskell uses might have a different.)
> >
> > On the other hand, this is not a fresh programming language, we have
> > lived okish without this so far, and in particular the behavior with
> > regard to instances might be sufficient reasons to reject this –
> > although not without some regret.
> >
> >
> > Cheers,
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20220831/c3d1a1ab/attachment.html>


More information about the ghc-steering-committee mailing list