[Haskell-cafe] Readable Haskell
Misja Alma
misja.alma at gmail.com
Sat Sep 19 17:07:38 UTC 2020
>> For naming, I follow Chris Done's suggestion:
https://chrisdone.com/posts/german-naming-convention/
Thanks! I didn't know it had this funny name, but the German name
convention is also widely used in the Java world.
But I wonder how well it works in Haskell, because unlike Java, in Haskell
a lot of stuff can happen in a single line. With those long variable names,
you'd have to
break those lines several times. I haven't tried it yet, but I wonder how
readable that is in Haskell?
Or am I looking at the wrong problem here, and should I first of all try to
have as little happening in a single line of Haskell as possible?
On Sat, 19 Sep 2020 at 18:22, Oliver Charles <ollie at ocharles.org.uk> wrote:
> For indentation and very mechanical formatting, I suggest just using
> something like hindent, brittany or ormolu (all available at your local
> Hackage).
>
> For naming, I follow Chris Done's suggestion:
> https://chrisdone.com/posts/german-naming-convention/
>
> On Sat, 19 Sep 2020, at 4:32 PM, Misja Alma wrote:
>
> Thanks, these links are really useful! This definitely answers part of my
> question.
>
> But what would still be really useful are some more or less generally
> accepted best practices about variable naming, indentation, when to use
> nested functions vs when to prefer keeping functions short, etc with
> regards to readability.
>
> On Sat, 19 Sep 2020 at 17:10, Henning Thielemann <
> lemming at henning-thielemann.de> wrote:
>
>
> On Sat, 19 Sep 2020, Misja Alma wrote:
>
> > Does anybody have any tips, or are there some sites or books that I
> > could read about this topic?
>
> It may be a bit old but we have some articles on style in the Haskell
> Wiki:
> https://wiki.haskell.org/Category:Style
> https://wiki.haskell.org/Category:Idioms
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20200919/45bedda2/attachment.html>
More information about the Haskell-Cafe
mailing list