
Daniel Mlot wrote:
Heinrich Apfelmus wrote:
* Cut the introduction. Make "5< False does not make sense" the sole motivation for types.
While I agree that the introduction does need streamlining, I am not so sure about eliminating it completely, as it can be useful for making it easier for readers to amalgamate all the other discussions in this part of the book around the key conceptual issue - that types are a way of incorporating meaning into values. That is why I kind of like the abstract "real world" example, even if in its current form it is a bit too overcooked to drive the point home.
Ah, it's just that in my experience, conceptual explanations usually do not work so well for introducing someone to a new concept for the first time. Usually, a hands-on approach that simply uses the concept gives better results: the student needs to figure out the concept himself, and usually does so in order to memorize the material anyway. I think Brent Yorgey has put it most brilliantly in his remark on the "Monad Tutorial Fallacy": http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-... In other words, the concept is synthesized from its particular examples, not the other way round.
Finally, a question about Next Steps the module. Do you see a place for it in the overall scheme of things? My question is largely motivated by the fact I am finding it rather difficult to picture a way to incorporate pattern matching into the "soft", largely conceptual modules about the type system (I am counting "Truth values" and "Lists and tuples" among these) without breaking their flow. That leads me to consider introducing piece-wise function definitions or even (x:xs) and (x,y) in a separate context.
Since the current Next Steps chapter is mainly about the alternative ("expression" vs "declaration") syntax to guards, where, and pattern matching, it should be moved to the second part of the beginners' track. Concerning the flow, I think that thanks to the modularity of the wikibook, we don't need to worry much about it. Simply making a new chapter on pattern matching seems fine to me.
The function composition operator is another potentially useful thing in "Next Steps" (because it fits well with the idea of stimulating creative usage of Prelude functions) that would be difficult to move to an earlier point of the book. That case is less serious, though, as there is the option of just moving it to "More on Functions".
Either "More on Functions" or the cheat sheet texts, I'd say. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com