<div dir="ltr">Pointfree is good for reasoning about <b>composition</b>. It can often be more readable than pointful code when the focus of the function is on composition of other functions. For example, take this function from Bird's <i>Pearls of Functional Algorithm Design</i>:<div><br></div><div> boxes = map ungroup . ungroup . map cols . group . map group</div><div><br></div><div>Compare the pointful version:</div><div><br></div><div>boxes matrix = map ungroup (ungroup (map cols (group (map group matrix))))</div><div><br></div><div>Readibility is subjective, but I think many people will agree that the pointfree version is easier to read.</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Feb 26, 2016 at 8:19 AM MJ Williams <<a href="mailto:matthewjwilliams101@gmail.com">matthewjwilliams101@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As I see it, Haskell and pure functional languages aren't<br>
`necessarily' about readability so much as expressing thought in<br>
mathematical terms.  The readability comes with the consistency and<br>
transparency of well-formed mathematical notation.<br>
by the way, that's transparency in laymen's sense and not referential<br>
transparency.<br>
Matthew<br>
<br>
<br>
On 26/02/2016, Dudley Brooks <<a href="mailto:dbrooks@runforyourlife.org" target="_blank">dbrooks@runforyourlife.org</a>> wrote:<br>
> One problem is that, while the symbolic operators do seem to have names<br>
> (specified in the standards?) which are often sufficiently explanatory,<br>
> you can find many tutorials which never even mention those names.<br>
><br>
> On 2/26/16 1:55 AM, Mike Pentney wrote:<br>
><br>
>> As a newbie, something I dislike about Haskell is the use of infix<br>
>> operators like <||> which are unpronouncable and therefore (if you<br>
>> don't happen to know the notation the symbol is based on) are more or<br>
>> less meaningless.<br>
>><br>
>> And Haskellers often seem to prefer 1 and 2 character variable names,<br>
>> which again convey little or no information.<br>
>><br>
>> And don't get me started on point-free code...!<br>
>><br>
>> N.B. I am not trying to start a flame war, these are just comments<br>
>> from my experience of trying to get beyond text-book examples and<br>
>> start using Haskell libraries and trying to learn from open source<br>
>> code. In general I find idiomatic Haskell hard to understand, and for<br>
>> me this is a barrier to using Haskell for real projects. Maybe someday<br>
>> I'll have learnt enough to get past this problem, but as the language<br>
>> and libraries seem to evolve quickly, I have my doubts...<br>
>><br>
>><br>
>> On 25/02/16 19:19, Jeffrey Brown wrote:<br>
>>> Something I like about functional programming is how it interfaces<br>
>>> with natural language.<br>
>>> Haskell, somehow to a greater extent than other languages, encourages<br>
>>> me to divide functions<br>
>>> into one or two-liners. Each has a type signature that means<br>
>>> something in English. Further, each<br>
>>> gives you the opportunity to choose a good name for the function and<br>
>>> its arguments. After doing<br>
>>> those things, the function is much easier to write, and much easier<br>
>>> to read -- so much so that<br>
>>> often you don't have to read the function body at all, just the type<br>
>>> signature, function name<br>
>>> and argument names.<br>
>>><br>
>>> On Thu, Feb 25, 2016 at 8:17 AM, Dudley Brooks<br>
>>> <<a href="mailto:dbrooks@runforyourlife.org" target="_blank">dbrooks@runforyourlife.org</a><br>
>>> <mailto:<a href="mailto:dbrooks@runforyourlife.org" target="_blank">dbrooks@runforyourlife.org</a>>> wrote:<br>
>>><br>
>>>     Ages and ages ago I saw this advice about programming:<br>
>>><br>
>>>     Q:  "What's the best language for a programmer to know?"<br>
>>><br>
>>>     A:  "English" (or whatever your native language is)<br>
>>><br>
>>>     -- Dudley<br>
>>><br>
>>><br>
>>>     On 2/24/16 4:03 PM, Dennis Raddle wrote:<br>
>>><br>
>>>>     This is more about programming in general than Haskell, although<br>
>>>> Haskellers probably know<br>
>>>>     it well.<br>
>>>><br>
>>>>     I don't claim to have expert knowledge on this, but I'm<br>
>>>> gradually getting better at it.<br>
>>>><br>
>>>>     When I set out to write a program, or refactor a program, or<br>
>>>> modify a program, it helps to<br>
>>>>     set out my thinking in a clear way. And how I make it clear is<br>
>>>> to document my thoughts.<br>
>>>><br>
>>>>     An outline is one good way to organize thoughts and is probably<br>
>>>> my main tool. But good<br>
>>>>     English prose is also helpful.<br>
>>>><br>
>>>>     The key factor is "editing." In what sense do I mean that? Good<br>
>>>> writers do it, and the<br>
>>>>     Haskell documentation does it. I mean (1) brevity and (2) good<br>
>>>> flow. To achieve brevity,<br>
>>>>     you must think about the essence of each statement and trim away<br>
>>>> the unnecessary stuff.<br>
>>>>     Good flow refers to how the document builds up and modifies your<br>
>>>> concepts as you read it.<br>
>>>>     A document can actually mirror an effective learning process, or<br>
>>>> influence and change your<br>
>>>>     process.<br>
>>>><br>
>>>>     I work with my documentation, making several editing passes. By<br>
>>>> the time I'm done, I am in<br>
>>>>     a great position to write a concise and flexible program.<br>
>>>><br>
>>>>     It's interesting that not only is Haskell a concise language,<br>
>>>> but the Haskell library<br>
>>>>     documentation is concise. Contrast that with the Python<br>
>>>> documentation which often wanders<br>
>>>>     about into areas that are irrelevant--it could easily be cut<br>
>>>> into one third its present size.<br>
>>>><br>
>>>>     Mike<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>>     _______________________________________________<br>
>>>>     Beginners mailing list<br>
>>>>     <a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a> <mailto:<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a>><br>
>>>>     <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
>>><br>
>>><br>
>>>     _______________________________________________<br>
>>>     Beginners mailing list<br>
>>>     <a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a> <mailto:<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a>><br>
>>>     <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Jeffrey Benjamin Brown<br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Beginners mailing list<br>
>>> <a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
>>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
>>><br>
>> _______________________________________________<br>
>> Beginners mailing list<br>
>> <a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
><br>
> _______________________________________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
><br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>