Fraser Tweedale

56 points
User profile image.
Brisbane

Software Engineer at Red Hat.
Interested in functional programming, category theory
and other intersections of math and programming.
Crazy about jalapeños.

Authored Content

Authored Comments

Hi Norton. There are two aspects to this.

First, the fact that many languages let you do I/O anywhere raises the question of whether it is worthwhile to avoid it except where absolutely necessary. It *is* worth it to do so because it lets you use fast and loose reasoning. The "functional core / imperative shell" pattern is an example of how this can work out in practice.

Second, is there a way to perform I/O (or other side effects) in a pure functional program (with all of the benefits that that would imply)? You can - you just need an *interpreter* to do the messy bits. In this sense the pure program is like a recipe: a set of instructions that don't do anything on their own.

Hi Matt. In my opinion, LYAH is good for learning Haskell syntax, and probably OK for beginner programmers. It explains a lot of things well but IMO does not do a great job of teaching foundational abstractions for FP (regardless of language). But these are just my own experiences, and regardless it is definitely a fun and engaging book.