<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-02-01 20:51 GMT+01:00 Marc Ziegert <span dir="ltr"><<a href="mailto:Coeus@gmx.de" target="_blank">Coeus@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[...] How about some more syntactic sugar?<br>
<br>
{-# LANGUAGE ImportSugar #-}<br>
import [Data.[Text, Foldable q-as F, Vector (Vector), Vector q-as V hiding (Vector)], Control.Concurrent, Data.List q (sum)]<br>
[...]</blockquote><div><br></div><div>o_O I am really not sure if this is a serious proposal or just some funny remark, taking the initial proposal to an extreme: Is it really a good idea to condense something so heavily? I don't think so, deciphering the above import probably takes you multiple times the effort to read the plain old simple imports spanning several (easy) lines. Quoting Martin Fowler: <i style="color:rgb(37,37,37);font-family:sans-serif;font-size:12.3704px;text-align:-webkit-center;background-color:rgb(248,249,250)">"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."  </i>This simply looks too ingenious, so <a href="http://wiki.c2.com/?KillYourDarlings">http://wiki.c2.com/?KillYourDarlings</a> probably applies, and so does <a href="https://en.wikipedia.org/wiki/KISS_principle">https://en.wikipedia.org/wiki/KISS_principle</a>.</div><div><br></div><div>Apart from the incomprehensibility for humans: For every seemingly "easy" syntactic extension, the cost for related tools like IDEs etc. has to be considered. Have fun e.g. extending syntax highlighting to handle such stuff.</div><div><br></div><div>And finally: What problem are we actually trying to solve? From my POV, imports are largely irrelevant when reading code, you just skim over them to get an idea, and then forget about them/fold them in your editor/mechanically clean them up via your IDE/etc.  The only time they are really important is when something goes wrong and/or name resolution is not obvious. And exactly at that time, one really needs simple stuff to look at, not a Perl-like one-liner. But as I said, that's just my opinion...</div></div></div></div>