caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "John Hughes" <jfh@cs.brown.edu>
To: "'Brian Hurt'" <bhurt@spnz.org>
Cc: <caml-list@inria.fr>
Subject: RE: [Caml-list] More or bignums/ints
Date: Wed, 23 Jun 2004 12:50:14 +0200	[thread overview]
Message-ID: <20040623105014.CEE8010EF06@clark.cs.brown.edu> (raw)
In-Reply-To: <Pine.LNX.4.44.0406111510250.4243-100000@localhost.localdomain>


Brian Hurt asked "How well does teaching ML in a first course work?"

To tell the truth, we teach Scheme for about 7 weeks, then 4.5 weeks
of 
ML, and then, in Spring, teach Java. Both Scheme and ML are taught 
purely-functionally: there's no "set!" in our world. The idea is to
teach them
  
* to think algorithmically
* to be able to analyze the big-O performance of their programs
* to know some basic structures like lists and trees, and even BSTs

For that, pure-functional is just fine. ML's structures and functors
give them a nice transition point towards OO programming: they start
to 
gather data and operations together, and they learn some data hiding
with
opaque signatures. By the time they reach Java, they're sophisticated
enough to complain appropriately: "You mean I can't just pass a
function
as an argument to another function? Why do I have to write a stupid
wrapper
around the Java container classes to get a safe CarList or a
TruckList? Why
isn't there appropriate polymorphism?" [OK, maybe they don't remember
that
it's called polymorphism, but they know that they want it...]

How well does it work? Well, the next year they end up in the same
courses 
as their friends who took a "program in Java" course first, and a
"data
structures and algorithms" course second. The average scores for the
two groups in the big software-engineering course are pretty much 
indistinguishable. Not surprisingly, the ones in OUR course do better
in the programming languages course in general. And lots of our
success
stories are with students who have never touched a computer before,
except
for email and Microsoft Word, so I think we're doing OK. 

Thanks again, to everyone here, for the suggestions on getting "safe"
integers into OCaml. I'm more or less committed to doing what was
suggested and redefining all the standard operations in some CS17.ml
"library" that's preloaded for them (after I show them the dark
underbelly of OCaml in which integer operations are silently 
incorrect <as operations on integers, I mean>). 

--John Hughes

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  parent reply	other threads:[~2004-06-23 10:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-11 19:38 John Hughes
2004-06-12  0:09 ` Jacques Garrigue
2004-06-14 15:37 ` Brian Hurt
2004-06-14 16:17   ` Andreas Rossberg
2004-06-14 15:55 ` Xavier Leroy
2004-06-15 22:45   ` Manos Renieris
2004-06-15 20:26 ` Brian Hurt
2004-06-15 20:36   ` Brian Hurt
2004-06-23 10:50   ` John Hughes [this message]
2004-06-23 14:51     ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040623105014.CEE8010EF06@clark.cs.brown.edu \
    --to=jfh@cs.brown.edu \
    --cc=bhurt@spnz.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).