[plt-scheme] The perfect teaching language--Is this too much to ask for?

From: hendrik at topoi.pooq.com (hendrik at topoi.pooq.com)
Date: Sun Jun 14 13:35:28 EDT 2009

On Sun, Jun 14, 2009 at 12:51:02PM +0100, Noel Welsh wrote:
> On Sun, Jun 14, 2009 at 12:19 PM, Martin DeMello<martindemello at gmail.com> wrote:
> > Straying further off topic, has anyone done a teaching-oriented ML
> > dialect, or even a first year course based on SML?
> 
> I believe the first year at Cambridge uses ML.
> 
> The issue is one of usability. It is pretty easy to get ML to spit out
> an incomprehensible type error  at a location far removed from the
> original error, and ML's type system is fairly simple.

Yes, that happens.  Usually because ML uses type inference, and decides 
what types things have based on the programming errors.... Then 
someplace else (possibly someplace correct) it craps out.

The solution is to explicitly specify types much more frequently, so 
that wrong types have no chance to propagate.

In other words, throw out the sophisticated type-inference engine, and 
force the user to specify types explicitly in lots of places.  Yes. this 
is wordy and redundant.  But it sure helps locate errors.

Programs where this is not done are also really, really difficult to 
understand.

Other than that, ML is probably fine.

> Furthermore, I
> believe the experience of the PLT crew and others is that allowing
> students to experiment with their programs -- actually run them
> despite type errors -- leads to better understanding.

I agree here.

-- hendrik

> 
> [And this is a valid complaint against a lot of theory-oriented work
> done in programming languages. ICFP, for example, is full of papers
> describing exotic type systems which is all well in theory, but what
> happens when someone outside the research group actually tries to use
> them?]
> 
> N.
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.