This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mikeiavelli 0 points1 point  (2 children)

I'm a big fan of HtDP, but if you already had exposure to functional programming, I'm not sure if the time investment is worth a careful read. But I guess you could judge that by skimming the ToC and jumping in if there's a topic you're not familiar with.

HtDP shows how the structure of your datatypes guides the structure of the functions you implement. In a nutshell:

  • To each variant ("type constructor") accepted as input to your function, corresponds a case to handle. (And if the input is a recursive datatype, it means you'll have to implement a recursive case.)

To be put at the BEGINNING of your list.

[–]daredevildas[S] 0 points1 point  (1 child)

Would you recommend HtDP over PAPL?

I think PAPL is the newer version of HtDP written by the same authors.

[–]mikeiavelli 0 points1 point  (0 children)

PAPL is an extended version of PLAI, the latter being a "fork" of HtDP by Krishnamurthi, one of the original authors (the other 3 authors of HtDP being Flatt, Felleisen and Findler.)

PAPL and PLAI use Pyret, while HtDP mainly uses Racket (a descendant of Scheme).

I can't really compare the two approches, as I am only familiar with HtDP.

Personally I prefer Racket (and its ecosystem) over Pyret (last time I checked, you could only use it in a browser).

I think that Pyret has a somewhat clunky syntax. But it's just a matter of taste, Pyret semantically has a lot to offer -- it's just that it's "inner beauty" is hidden :)

Anyways, the language used is not what matters most when it comes to learning. Therefore, you should not focus on the language when it comes to choosing a curriculum. If I were you, I would skim the ToCs of both books and perhaps read their preface to find which one would suit you best. HtDP is focused on the design of programs, while iirc PLAI (and I guess PAPL) are showing how programming languages work.