Reflect on Haskell’s strengths and weaknesses, and on those of strongly typed, lazy, functional programming in general.
Beginning of class session 23.
Write a brief (1–2 page, single-spaced, font size ≤ 12 point) essay summarizing your thoughts on the strengths and weaknesses of Haskell and of the strongly typed, functional paradigm in general. Be sure to address the types of projects for which you think Haskell would be good and the types where Haskell might be a poor fit.
My objective in asking you to do this is to help you learn to think about how to choose between the programming language tools available, rather than just reaching for the same tool you've always used. As someone said, “To the programmer who only knows C++, every problem is a thumb.”1
Submit your essay to me as a pdf file by email before the homework deadline. Only pdf files will be accepted.
10 POINT BONUS: Due Monday of week 7.
Extend the stateful monadic interpreter from class by adding support for boolean values and expressions. You should add and implement the following terms:
true, false),
1 < 2),
a == b),
x and y),
x or y),
not true), and
if x then 0 else 1).
Variables in your interpreter should be able to store boolean or integer values.
If you choose to do this bonus problem, do your work for it in the folder HaskellBonus in your individual SVN repository. I’ll create that folder after class on Monday of week 6.
I’ve extended the EddieParse and EddieTypes modules in that directory to handle the new terms. You just have to add cases to eval in EddieEval.hs. See the comments in that file for details.
Turn in your essay as a pdf file by email to me. Commit the bonus problem, if you choose to do it, to your individual SVN repository for the course.
1 This joke mis-paraphrases the old saw, “To the man with a hammer, everything is a nail.”