[plt-scheme] htdp and modules
Jan Christiansen wrote:
> this looks fine, too. Is there a possibility to get rid of the #f? In a
> corresponding lecture the students are taught scheme and they don't
> learn anything about this extra argument. I would like to stick to this
> lecture as close as possible.
Sorry, in my previous response I was working with incomplete
information, since I get the plt-scheme digest, but also some messages
early when they are sent/CC'd to me.
If you are planning to use modules for abstract data types (I will do
this also next term, in the followup to the HtDP course), the #f
argument to define-struct is not correct. That makes the fields visible
to all code, violating the abstraction. You need (make-inspector) as the
third argument.
I will be telling students to do this, but I am on shaky ground in doing
so, since I know the effect but not the reason for the form. That is, I
don't understand inspectors well enough. They also have to learn about
working in the "(module ...)" language to be able to debug.
So, Matthias, if it is all about teaching principles, not languages
(which I fully agree with), maybe we should discuss a language level
that is past Advanced but not as wide open as Pretty Big? I know there
is a reorganization planned for 4.0, but I don't think it includes a
language that is just large enough for my second course. --PR