Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: David Teller <David.Teller@univ-orleans.fr>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Before teaching OCaml
Date: Mon, 08 Jan 2007 09:37:44 +1100	[thread overview]
Message-ID: <1168209464.8650.36.camel@rosella.wigram> (raw)
In-Reply-To: <1168193722.6133.38.camel@Blefuscu>

On Sun, 2007-01-07 at 19:15 +0100, David Teller wrote:
>   Dear list,
> 
>  I'm going to start teaching OCaml soon and I'm fishing for ideas and
> suggestions. I hope this list is the right place to ask.

> Right now, I see the following difficulties:
> 
> * the environment -- under Windows, is there any viable alternative to
> Emacs + the MinGW-based port ? 

Emacs? Gak! You want them to waste the whole semester
learning an editor? Notepad is perfectly acceptable.
There's probably a version of gedit that runs on Windows.

The Windows native port is fine, but you do need the 
MS assembler and compiler executables (and ml.err, the
assembler error file). 

> * the Makefile

Why not just show them how to write out a script by giving them 
a simple example to edit, something like:

ocamlc -c file1.mli
ocamlc -c file2.mli
ocamlopt -c file1.ml
ocamlopt -c file2.ml
ocamlopt file1.cmx file2.cmx -o program

and explain the ordering requirements. 

There are several auto-makers for Ocaml (as mentioned in other
emails) .. but using these hides understanding of how the
ocaml tools work.

> * the task -- for the moment, I have no interesting idea of OCaml-based
> projects. Perhaps something like finding the shortest path along
> subway/train lines ?

I would tend to provide a simple but not trivial problem,
and get them to write it in a familiar procedural style .. then
show how to convert it to a functional style, and what the
advantages are. So you'd want to pick a problem which is 
amenable to both kinds of solution.

EG .. convert loops to tail recursions, convert inner 
recursions to tail recursions, replace variables
with arguments, continuation passing, HOFs, etc.

One possible project is a small interpreter .. it has 
plenty of scope for variations, and has the advantage
of being interactive without requiring graphics.


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


  parent reply	other threads:[~2007-01-07 22:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-07 18:15 David Teller
2007-01-07 20:25 ` [Caml-list] " Dan Hipschman
2007-01-07 21:07 ` Sylvain Le Gall
2007-01-07 21:13 ` [Caml-list] " Aleksey Nogin
2007-01-07 21:20 ` Richard Jones
2007-01-07 22:37 ` skaller [this message]
2007-01-08 18:26   ` robert
2007-01-08 18:49     ` Jacques Carette
2007-01-08 19:31       ` robert
2007-01-07 23:17 ` Jacques GARRIGUE
2007-01-08  6:56   ` Oliver Bandel
2007-01-08  2:47 ` Jon Harrop
2007-01-08  6:45 ` Oliver Bandel
2007-01-08  9:33 ` Andrej Bauer

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=1168209464.8650.36.camel@rosella.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=David.Teller@univ-orleans.fr \
    --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