A colleague asked me this:
I am a physicist with a slant toward imperative programming language.
Question Where can I find a nice introduction to haskell, possibly relevant to a C-language-programming-physicst ?
What would you say?
Simon
A colleague asked me this:
I am a physicist with a slant toward imperative programming language.
Question Where can I find a nice introduction to haskell, possibly relevant to a C-language-programming-physicst ?
What would you say?
Simon
I am staunchly in favour of recommending Learn You a Haskell as an introductory text for people from this background who wish to learn in the absence of a dedicated teacher.
From their own About section:
This tutorial is aimed at people who have experience in imperative programming languages (C, C++, Java, Python …) but haven’t programmed in a functional language before (Haskell, ML, OCaml …).
Other answers may be more relevant to learners with access to teaching staff!
Specifically as an introduction, I suppose their introduction page is no bad starting point.
I sadly do not think there is something like «C programming for physicists» in Haskell.
As a physicist by training, I’d rather say that there’s no need for a
“Haskell programming for physicists” since haskell is much more tailored for a physicist than C would ever be, IMHO.
What would be missing is the basics of software development, not about the language itself.
Having said that, I’m afraid that LYAHFGG is now out of touch with modern day haskell, but I might be wrong.
Maybe it would simply require a facelift…
I’m afraid that LYAHFGG is now out of touch with modern day haskell
Not by very much, though… my recollection is that it defines class Monad m
rather than class Applicative m => Monad m
, and it doesn’t define State
etc. in terms of monad transformers, but it’s otherwise OK.
My personal take is that it would be ok for people knowing the language, but it’s a barrier and highly demotivating to anyone trying to learn something new using outdated material…
I had most of my Haskell “Aha!” moments when reading Get Programming with Haskell by Will Kurt.
As a possible second book, I’d recommend Haskell in Depth by Vitaly Bragilevsky.
I’ve been a physicist for more than a decade and I’ve mostly programmed in C and Python before. These two books aren’t tailored to needs of physicists, though.
I will always recommend the Gentle Introduction To Haskell: https://www.haskell.org/tutorial/
It’s very nicely written and delightful to read.