[racket] Why not use a typed language for HtDP?

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Sat Aug 24 08:09:27 EDT 2013

Ben,

In my own experience, novice programmers will often see type enforcement as
a barrier to programming, as they do not yet understand what problems the
type checker is sparing them.  This leads to a lot of frustration, and to
resentment of the type system.

Using an untyped language to teach programming allows novices to make their
own mistakes, to see what happens when you don't enforce a type discipline,
and to learn why enforcing it is a good idea.  Give a student time to make
their own mistakes, then introduce them to a statically typed language and
quite often they'll love it.  They'll be immediately familiar with the
kinds of errors it's sparing them from, and grateful for the reduced
frustration.

So it's kind of perverse: typechecking early -> more frustration,
typechecking later -> less frustration.  This has been my experience at
least, having seen functional programming taught both with ML and with the
HtDP languages.

Carl Eastlund


On Sat, Aug 24, 2013 at 4:38 AM, Ben Duan <yfefyf at gmail.com> wrote:

> Dear All,
>
> Here’s a beginner's question about How to Design Programs.
>
> HtDP puts great emphasizes on data, and it forces the reader to think
> about data types by writing signatures. Then what not use a typed language
> so that it is forced by the language itself? Or did I misunderstand the
> purpose of the authors?
>
> Thanks and regards,
> Ben
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130824/f3c8b206/attachment.html>

Posted on the users mailing list.