[racket] match in Advanced Student?
On Aug 17, 2011, at 6:12 PM, Prabhakar Ragde wrote:
> If it were up to me, I would take the built-in definition of posns
> out. I don't think being able to use `make-posn' for a few minutes
> before introducing `define-struct' is worth the hassle.
On the other hand, I introduce "make-color" very early indeed -- in
chapter 3, before function definitions -- and "make-posn" in chapter
20, but "define-struct" not until chapter 21. Emmanuel convinced me
that it really helps students to get a lot of practice creating
instances of struct types before they have to write functions working
on them, much less defining new struct types.
But Emmanuel is dealing with 14-year-olds, and I'm dealing with
college non-majors, while Prabhakar is dealing largely with CS majors.
Still, I don't see any reason not to allow the full match syntax in,
say, ISL, as soon as one can use function names in argument position
and define new variables with local scope.
Stephen Bloch
sbloch at adelphi.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110818/68d9c55f/attachment.html>