Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I read the first or second edition of "Introduction to Functional Programming" by Bird & Wadler? [closed]

I've heard it's better to read the first edition of "Introduction to Functional Programming" by Bird & Wadler than the second edition. The first edition uses Miranda, and the second edition uses Haskell.

Is this a common recommendation? My goal is to get serious about functional programming. Thoroughly knowing the concepts of functional programming is more important to me than knowing a language's syntax, so I'm fine with learning Miranda if the first edition is somehow better.

I know F# and Scala.

like image 633
royco Avatar asked Oct 22 '10 03:10

royco


People also ask

Should I learn functional programming first?

The biggest plus of learning a functional language before learning an OOP lang is that your programming skills get developed first and then you can easily grasp the OOP concepts.

Is functional programming hard to read?

One of the elements which make people say that functional programming code is difficult to read is that it gives preference to a more compact syntax. Long answer: Functional programming itself cannot be readable or unreadable, since it's a paradigm, not a style of writing code.

What is the easiest functional programming language?

The simplest way to get started is Dr Racket. Racket is a language of its own (another dialect of Lisp) but it supports the Scheme compiler as a subset and provides rich auto-formatting, static code analysis, and debugging features out-of-the-box.


2 Answers

I strongly recommend the second edition, which is an extensively revised, extended and mostly improved revision of the first edition. I have read both editions. The first edition has an example on solving the 8 queens problem with backtracking, unfortunately this example was dropped in the second edition. The second edition is my favourite book on Haskell.

The examples are from mathematics, including proof by induction. The material on deriving programs from their specifications by Bird in the second edition is awesome, I love this book. If you can handle examples from maths, this book is superb.

I think this book is also a great introductory text on Haskell, however I found that as soon as I tried writing Haskell programs that I often had to read material from other tutorials, and kept having to refer to Real World Haskell.

Another great text on mathematics and logic, with examples using Haskell that helps to understand the maths, is the Haskell Road to Logic, Maths and Programming. Bird's text goes much deeper on Haskell programming.

like image 139
gienah Avatar answered Sep 20 '22 22:09

gienah


I haven't read Bird & Wadler, but Miranda and Haskell are similar--purely functional, nonstrict, statically typed, etc. If language is your only consideration when choosing the edition, I'd choose Haskell because it's more popular and free, and hence easier to get hands-on experience with.

I haven't used Miranda, but my understanding is that it's the primary predecessor to Haskell and that Haskell would not have existed unless its creator had closed the source and tried to make it a commercial product. It's still referred to as MirandaTM sometimes because of this.

like image 36
Nathan Shively-Sanders Avatar answered Sep 19 '22 22:09

Nathan Shively-Sanders