Grups de Google ja no admet publicacions ni subscripcions noves de Usenet. El contingut antic es pot continuar consultant.

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

0 visualitzacions
Ves al primer missatge no llegit

David Teller

no llegida,
22 de maig 2007, 18:11:4822/5/07
a 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

no llegida,
23 de maig 2007, 3:48:4923/5/07
a 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

no llegida,
24 de maig 2007, 9:27:2624/5/07
a 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 missatges nous