Skip to content

Comments/errata on "garrulous gastropod" #49

@gsinclair

Description

@gsinclair

I am part way through the book and enjoying it very much. Here are the things I have noticed.

Comments on FP-OO (version G)

p27: (One or more semicolons starts a comment.

  • missing closing parenthesis

p23 or so: If you know Ruby, map is the same as collect.

  • This seems odd to me, presuming that a Ruby person knows collect first and
    map in terms of collect. I'm a long-time Ruby programmer and have always used
    map. I think "collect" is a Smalltalk flavour.

p29: Note: if the problems you think of...

  • I don't understand this paragraph.

p40: Here's a less boring method: shift

  • The rendering of "shift" is odd, with too much space between i and f

p49: So Clojure provides an alternate way to name sub-computations.

  • I suggest "alternative" instead of "alternate".

p57: I would prefer getting an exception over getting a nil.

  • The space between "a" and "nil" is too small. Same in following sentence.

p69: ...it passs a partial solution down the levels...

  • typo: 'passs'

p76: Section 6.5 "Finishing up"

  • the apply-message-to used here no longer has the fallback of returning an
    instance variable (i.e. no automatic getter). Is this intentional? If so,
    it should be mentioned.

p93: There's little of interesting remaining.

  • Should be interest.

p94: There you have it: a pretty functional solution to our problem.

  • I'd like to see a demonstration of it working.

p96: If you’d like to examine this solution in more detail, see sources/wrapped-scheduling.clj

  • no such file; it's (now) called scheduling-variant.clj

General comment:

  • why all this (def ... (fn [...] ...)) instead of (defn [...] ...) ?

p103: Here's a sequence of maps:

  • unexpected and unnecessary page break

p106:

  • another ugly page break

p107: whether it be handled with objects or not

  • I like a good subjenctive as much as anyone, but this reads funny to me
  • suggestion: remove "it be"

p110: complement would be easy enoguht for us to define:

  • keep this paragraph with the code that follows

p115: Exercise 2 -- your output is [false (:c :b :a) 3], but I get mil instead
of false

p117: Exercise 9 -- the calculation is supposed to be for [4 8 9 3 2], but it's
actually for [4 8 9 4 2].

p117: Implement check-sum and upc? and check it against these numbers (also in the sources):

  • no numbers follow the colon; the text goes straight to the next exercise

p118: In object-oriented programs, It’s not horribly unusual

  • unwarranted capital letter

p121: unnecessary page break

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions