Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Teaching bottomline, part 2: what went right.

0 views
Skip to first unread message

David Teller

unread,
May 22, 2007, 6:11:48 PM5/22/07
to OCaml

A number of things went well, sometimes impressively.


* A number of students seem to get the hang of functional programming
(programming without side effects, returning closures, functions as
first-class citizens, recursive loops...)

* Modules seem generally rather well understood.

* The students enjoyed Graphics immensely.

* When asking students to write a specific function, it's much easier to
show examples with OCaml than with, say, Java. Consequently, exercices
are generally better understood.

* Some of the students have started answering some mathematical
questions with OCaml programs.

* One of my students did manage to write a function with type 'a -> 'b
without using Obj or Marshal. Others managed to explain me (almost)
correctly why this shouldn't be possible.

* The students seem to have understood exceptions, as well as file
management. Two things they just couldn't do at all in Java.

* Most students seem to have no problems using references when they need
them.

* I believe that students actually understand better Java now that they
have seen something a bit more abstract. Plus they had much more fun.

* #trace is good. Very good.

--
David Teller ------------------------------------------
Security of Distributed Systems -----------------------
-- http://www.univ-orleans.fr/lifo/Members/David.Teller
----- Laboratoire d'Informatique Fondamentale d'Orleans

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Hendrik Tews

unread,
May 23, 2007, 3:48:49 AM5/23/07
to caml...@yquem.inria.fr
David Teller <David....@univ-orleans.fr> writes:

* One of my students did manage to write a function with type 'a -> 'b
without using Obj or Marshal.

It's easy if the function doesn't have to terminate:

let f x = raise Not_found;;

Does the students function terminate without exception or other
kinds of runtime errors?

Bye,

Hendrik

David Teller

unread,
May 24, 2007, 9:27:26 AM5/24/07
to Hendrik Tews, caml...@yquem.inria.fr
No, it fails at runtime, of course:
let f _ = List.hd []

I'm just happy that that student managed to produce such a function.
Remember that they've had only one term of OCaml/functional programming,
no type theory, no lambda-calculus, no semantics of programming
languages, etc.

Cheers,
David

0 new messages