[Haskell-cafe] styles

padiolea at irisa.fr padiolea at irisa.fr
Tue Jan 18 20:05:20 EST 2005


> Haskell seems to be a language that allows for lots of different
> programming styles.  The most obvious being pointed v.s. point free.
>
> As a programmer born and raised on OO - I have found the pointed style
> to suit me better.

As a programmer born fp but that like oo too, I prefer to define . as:
 (.) o f = f o
it allows to do code like:
 [1..4].map (\x -> x+1).fold (+).  etc    and so do
 oo one liner.

>
> However, there are other distinctions.  I heavily use "let in" and
> "where" to break up each function into smaller parts while I see other
> programmers putting everything in one line.
>
> I have seen the evolution of a Haskell programmer joke and most of it
> goes over my head.
>
> My question is
>
> "Is there standard terminology for the different programming styles in
> Haskell (besides pointed and point-free)?"


I know that in his haskell retrospective
(http://research.microsoft.com/Users/simonpj/papers/haskell-retrospective/HaskellRetrospective.pdf)
simon peyton jones called about "expression style" vs "declaration style"
(slide 15) when opposing the let-in vs where (and other opposition).

(you may also find information on styles
at http://www.haskell.org/hawiki/CommonHaskellIdioms
and http://www.haskell.org/hawiki/HaskellStyle)



>
> Matt
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>




More information about the Haskell-Cafe mailing list