<div dir="ltr"><div>There have been 19 votes cast so far. We have twelve +1 votes. Of the -1 votes, three are because "`pure` is fine" and four are because "`(:[])` is fine." I summarized the issue with `pure` in my previous email, and there hasn't been any response or comment on the issues raised.<br></div><div><br></div><div>To summarize/quote the issues with `(:[])`:</div><div><br></div><div>> You can't even search for it on hoogle: <a href="https://hoogle.haskell.org/?hoogle=(%3A%5B%5D)" target="_blank">https://hoogle.haskell.org/?hoogle=(%3A%5B%5D)</a></div><div>> Another advantage to having an explicit singleton function is discoverablity.</div><div><br></div><div>The discoverability of `(:[])` is bad.</div><div><br></div><div>> Is `(:[])` a core idiom? I never see it in work code and I've never seen it in Hackage. To check, I grepped my software directory which has all my Haskell code, and got 122 matches of (:[]) over 1,768,231 loc (as given by wc -l **/*.hs).</div><div><br></div><div>`(:[])` is not a common idiom (in the code sample I have; your mileage may vary).</div><div><br></div><div>> All alternatives to construct a list "anonymously" are confusing and take time to parse.</div><div>> The `(:[])` operator takes me a decent amount longer to parse and recognize, and I have seen intermediate-level Haskellers trip up over unspaced operators like this in several contexts.</div><div><br></div><div>The operator section is confusing and difficult to parse in this context.</div><div><br></div><div>Those are the three main problems that people have with `(:[])`, as far as I can tell.</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Matt Parsons</div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019 at 11:10 AM Herbert Valerio Riedel <<a href="mailto:hvriedel@gmail.com">hvriedel@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> `(:[])` is also unsatisfactory<br>
<br>
Which is a purely subjective assessment (and one I clearly disagree with)<br>
<br>
> To parse it properly, you need to:<br>
><br>
> - Know that `:` is only allowed as an operator to prefix data constructors,<br>
> - Know that `[]` are not legal operator characters,<br>
> - Infer that you're intended to insert a space between the `:` and `[]` to get `(: [])`<br>
> - Recognize it as an operator section being used prefix as a normal function<br>
<br>
Indeed, in order to parse a legit Haskell term, be it (0(,)), (:[0])<br>
or (:".exe") or (:[]) you need to know the core Haskell98 syntax. I'm<br>
aware that other languages such as Elm or Purescript favor different<br>
ideals and design principles but that's not really a good argument to<br>
make either; each language has its own idioms and point in the design<br>
space.<br>
<br>
I'm still waiting for a statement of the technical problem we're<br>
trying to solve here which requires the introduction of a redundant<br>
synonym for a concise facility we already have at our disposal by<br>
virtue of the core Haskell98 syntax. Otherwise I'm afraid we're going<br>
to be stuck in this discussion as everything on the topic has been<br>
said and repeated in one way or another and so far we haven't reached<br>
any consensus.<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>