<div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">I think refactoring to use consistent naming is a good idea, but I am not sure about the class idea.</div><div dir="auto"><br></div><div dir="auto">To see if it is viable, we should list the types in question and the operations we'd like to overload.  </div><div dir="auto"><br></div><div dir="auto">I find that with containers there tend to be two cases: either the operations are similar but not exactly the same and you have to do type hackery to make things fit, or you realize that you can just use the same type in multiple places.</div><div dir="auto"><br></div><div dir="auto">Iavor</div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 24, 2019, 07:12 Andreas Klebinger <<a href="mailto:klebinger.andreas@gmx.at">klebinger.andreas@gmx.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello devs,<br>
<br>
I would appreciate feedback on the idea in<br>
<a href="https://gitlab.haskell.org/ghc/ghc/merge_requests/934" rel="noreferrer noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/merge_requests/934</a><br>
<br>
Maps/Sets in GHC for the most part offer the same basic functionality<br>
but their interfaces differ.<br>
In order to make this easier to work with I propose using overloading<br>
via IsSet/IsMap classes.<br>
<br>
The goal is to make working with these data structures simpler by having<br>
a uniform interface<br>
when it comes to names and argument orders.<br>
<br>
There are downsides, but to me they seem minor. Error messages can be<br>
more confusing when one<br>
get's the types wrong. We have to import the class to use it and the like.<br>
However overall I think making code easier by not having to remember the<br>
naming scheme + argument order<br>
for the different possible instances would make this worthwhile.<br>
<br>
But GHC isn't my project but one of the community so please voice your<br>
opinion on the matter on the<br>
merge request!<br>
<br>
Cheers<br>
Andreas<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank" rel="noreferrer">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>