[racket] Matthias said something about types -- was: Re: Python creep
On Wed, Jul 02, 2014 at 09:05:53PM +0200, Matthias Felleisen wrote:
>
> On Jun 27, 2014, at 9:08 PM, Todd O'Bryan wrote:
>
> > I know Matthias thinks types are a horrible thing to make students deal with first semester,
>
>
> What I have said in the past:
>
> (1) HtDP teaches a type-directed notion of design, including the imperative parts (VII and VIII).
When my son started on HtDP, he got stuck at the point where you
introduced data definitions because they weren't processed by the
prograamming language, yet they seemed to have a somewhat formal
structure. This bothered hm no end.
I think he would have appreciated explicit static data types being part
of the language he was being taught.
>
> (2) type inference (the dominant way of checking types in our world
> when we launched PbD) is a miserable choice issuing error messages
> incomprehensible to experts.
That's the one thing thing I hate about OCaml -- the
incomprehensibility of the type-check messages. The syntax I merely
dislike. For the rest, it's one of my preferred languages.
>
> I stand by these two points. Period.
Agree.
>
> (3) type checking is something whose error messages is likely to confuse students more than help them once it fails. That's especially true if the type system supports polymorphic types and we teach with them.
>
> I can now modify this stance a bit:
> -- modern IDEs exploit type information in a way that helps students compose expressions properly and
> -- this positive contribution outweighs the negative that yet another layer of the software can issue error messages.
> (I used to characterize this as "students comes to me and says `the computer did this to me' for some value of this < error").
>
> One day we may turn this modification into something.
The way to make the type inferencing work, for me at least, is to
explicitly specify my types almost everywhere -- certainly
for every function parameter and let-name.
-- hendrik