External Publication
Visit Post

Is there an idiomatic Haskell?

Haskell Community [Unofficial] May 10, 2026
Source

My first thought, as others have said, is there isn’t as much of a drama with Haskell as other languages. There’s no ‘design patterns’ compendium, for example.

OTOH, there’s certainly newbie code I would (and have) described as unidiomatic. See Stackoverflow [Haskell] {not |un}idiomatic.

Telltales include too much nested if then else rather than case | guards; few curried definitions; over-use of Lists; …

A useful discussion example might be this Java-to-Haskell case study. My feeling is both of the Haskell approaches seem too Java-y(?)

That the code is no shorter isn’t really the point. Using advanced List functions like intersperse is rather cheating (and intercalate smuggles in a concat, with embarrassingly bad performance).

Along the same lines as that Layer Cake piece, there isn’t clear separation of the ‘business logic’ (a triangular array) vs the human-readable prettifying vs the IO.

Discussion in the ATmosphere

Loading comments...