From: Vincent Aravantinos <vincent.aravantinos@yahoo.fr>
To: caml-list@yquem.inria.fr
Subject: Re: Re: Teaching bottomline, part 3: what should improve.
Date: Wed, 23 May 2007 13:00:51 +0200 [thread overview]
Message-ID: <3A6A724D-68A1-4D21-8EF8-7B39F64110E6@yahoo.fr> (raw)
In-Reply-To: <20070523100002.6B193BC73@yquem.inria.fr>
On Wed, 23 May 2007, Loup Vaillant wrote :
> (...)
>> * Anonymous functions are still beyond most of them.
>
> That sounds surprising, for anonymous function are no different
> from named ones:
>
> 5;; (* a value *)
> fun x -> x+1;; (* another value, which happens to be a function *)
Those are typically the comments of a "used-to-functional-
programming" guy.
It certainly doesn't match what a beginner would think (no beginner
will call a
function a "value").
Or do you really think that seeing functions as first-class object is
the natural way ?
IMHO this is not the case, and therefore not the case of a beginner.
To my eyes, there are (I mean, "in human mind" or at least in an
ocaml beginner's mind)
values AND functions. A function turns into a value (in the mind of
the programmer)
only when it is used by a higher order function.
> a = 5;; (* a bound value *)
> b = fun x -> x+1;; (* another bound value, which happens to be a
> function *)
>
> Did your students used map and fold-like functions much? These almost
> require anonymous functions.
Indeed, using map and fold puts the focus on the fact that functions
_can_ be values.
Thus their importance in a pedagogical context.
Maybe all this is just a matter of belief...
Regards,
Vincent
next parent reply other threads:[~2007-05-23 11:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070523100002.6B193BC73@yquem.inria.fr>
2007-05-23 11:00 ` Vincent Aravantinos [this message]
2007-05-23 13:21 ` [Caml-list] " Loup Vaillant
2007-05-23 17:05 ` Pal-Kristian Engstad
2007-05-23 17:16 ` Pal-Kristian Engstad
2007-05-23 17:57 ` Robert C Fischer
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=3A6A724D-68A1-4D21-8EF8-7B39F64110E6@yahoo.fr \
--to=vincent.aravantinos@yahoo.fr \
--cc=caml-list@yquem.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