caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jean-Marc Eber" <jeanmarc.eber@lexifi.com>
To: "Pierre Weis" <Pierre.Weis@inria.fr>,
	"Mattias Waldau" <mattias.waldau@abc.se>
Cc: <caml-list@inria.fr>, <leary@nwlink.com>,
	<jonathan@meanwhile.freeserve.co.uk>
Subject: Re: Why is Ocaml better than Java (WAS: [Caml-list] ocaml complexity)
Date: Mon, 11 Jun 2001 21:36:55 +0200	[thread overview]
Message-ID: <001401c0f2ad$e05673c0$060000c0@N7YYB> (raw)

There is another argument in favour of FP (more precisely in favour
of polymorphism + type synthesis) that is, I think, often not enough
emphasised even if, unfortunately, it also only works "in the large".

It's the easiness with which
you can *modify* a big piece of code. More precisely, I'm speaking here
about code that is maintained over many years (say 10 or 15 years) and
constantly
"updated" to work under new circumstances.  Most of the time, this means in
fact a
"generalisation" of the software. A typical example is for instance a
"program" that manipulates, say, floats and is generalised for manipulating
sets of
floats (typically represented as lists). The old case being just the
particular
case of a singleton list.

When you are doing this kind of "software upgrade" with, say, OCaml, it
appears often that you just have to change and adapt the two ends of your
treatment
chain, the intermediary steps "adapting" automatically thanks to the type
unifier.
It's the possibility to do minimal explicit type annotation of your source
code (with
type security albeit of course) that gives incredible flexibility.

Even after a few years of FP programming, I'm still fascinated by the
easiness of patching for instance the OCaml compiler itself (not a small
piece of
code indeed!) by chirurgical minimal source code modifications (replace a
simple value by a tuple etc…).

I miss a FP textbook (but perhaps I'm wrong and someone on this list knows
one) that not only explains that it is easy, sure etc… to write programs in
FP,
but that shows how easy one can *transform* a FP program, by keeping the
"illusion" (thanks to the type unifier) of doing only a minimal change.


Jean-Marc Eber
LexiFi Technologies
17, square Edouard VII
F-75009 Paris - France
tél : 33 1 53 43 92 48
fax: 33 1 53 43 94 94
email: jeanmarc.eber@lexifi.com


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-06-11 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-11 19:36 Jean-Marc Eber [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-06-08 10:15 Dave Berry
2001-06-08  9:41 [Caml-list] ocaml complexity leary
2001-06-08 10:05 ` Why is Ocaml better than Java (WAS: [Caml-list] ocaml complexity) Mattias Waldau
2001-06-08 13:31   ` Pierre Weis
2001-06-08 16:37     ` William Chesters
2001-06-08 21:39   ` Brian Rogoff
     [not found]   ` <Pine.BSF.4.21.0106081430070.27414-100000@shell5.ba.best.co m>
2001-06-08 22:16     ` Chris Hecker

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='001401c0f2ad$e05673c0$060000c0@N7YYB' \
    --to=jeanmarc.eber@lexifi.com \
    --cc=Pierre.Weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=jonathan@meanwhile.freeserve.co.uk \
    --cc=leary@nwlink.com \
    --cc=mattias.waldau@abc.se \
    /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).