[PRL] Re: [CSG711] Function Template developed further
Matthias Felleisen
matthias at ccs.neu.edu
Wed Sep 14 11:59:27 EDT 2005
On Sep 14, 2005, at 11:33 AM, Karl Lieberherr wrote:
> Of course, the above relation only makes sense in a typed world. Is
> that why
> Matthias thinks it is a pedagogically super bad idea? I feel the
> opposite,
> writing the templates just duplicates the structure over and over and
> gets
> utterly boring after a while. A key rule of good programming is DRY:
> Don't repeat yourself. Specifically don't repeat your structure
> definitions
> over and over. Instead just refer to the essential elements for a
> particular
> requirement.
If you have read the blue book, you know by now that you write the
template
once for every signature (with data def) and that you re-use it all the
time.
Karl will of course teach you that in Thursday's lab where he shows you
how to go about the practical workings of programming in HtDP.
;; ---
The reason that generating any piece of code is a bad idea is that
students
first need to learn how things work before they let someone or
something else
do things for them.
-- Matthias
More information about the PRL
mailing list