[racket] match in Advanced Student?
On 8/17/11 10:30 AM, Shriram Krishnamurthi wrote:
> My experience last year was that the restrictions on some of these
> sub-forms were arbitrary and not helpful. It also makes it harder for
> students because if they click on the "wrong" documentation, they
> don't understand why the thing that the docs say should work doesn't.
Well, I certainly didn't. The Advanced Student documentation doesn't
really explain `match', so one has to go to the Guide or Reference
anyway (e.g. for quasipatterns). It takes some careful peering at the
grammar of Advanced Student to notice that ASL `match' is restricted,
and to figure out what is permissible.
I would like to use `and', `or', and `?' patterns, at least. But to do
so I have to take the students into Advanced Student earlier than I want
(just after functional abstraction) and forbid them to use all the `!'
functions and I/O. However, if I'm only going to get a restricted
version of `match' by doing that, I might as well take them into #lang
racket.
Okay, maybe I won't go to that extreme yet. Let me see how far I can get
without full `match'. --PR