caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: "Till Varoquaux" <till.varoquaux@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] [OSR] OCaml Standard Recommandation Process
Date: Mon, 28 Jan 2008 23:10:54 +0000	[thread overview]
Message-ID: <200801282310.54770.jon@ffconsultancy.com> (raw)
In-Reply-To: <9d3ec8300801281405y5fc18db5sce85639dfc3dee22@mail.gmail.com>

On Monday 28 January 2008 22:05:30 Till Varoquaux wrote:
> It is worth noting that OCaml is not F#. Objects in OCaml, unlike in
> F#, are an advance feature, many users find them hard to grasp and
> work with. They also come with a rather high runtime cost. Unless we
> have a good reason to do so, I think we should avoid bolstering them
> at the very core of the standard library.

In this case, the user doesn't see anything at all of the objects.

> Don't get me wrong, I think objects have a purpose; and so have
> polymorphic variants and recursive modules but great care should be
> taken before axing the core library around them.

Absolutely. I couldn't agree more.

I would say exactly the same of working around the absence of a "try..finally" 
construct using combinators. The problem is that trivial tasks like reading 
lines from a file are made much more difficult for newbies because OCaml 
pulls in so many complicated concepts but this complexity is completely 
incidental, completely man-made. OCaml is better in the long-run, of course, 
but many languages solve these common problems much more elegantly than 
OCaml.

> We should keep complicated solutions for complicated problems.

Exactly but OCaml is moving in the opposite direction because it is a research 
project: it is getting more complicated.

The community would benefit enormously from lots of simple things like 
String.fold_right and a "try..finally" construct (I've no preference for 
those two, I'm just picking them out of hundreds of common ideas) but INRIA 
cannot afford to do such things themselves and are instead focussing on 
advanced research concepts like integrating generalized algebraic data types 
instead. That is great research, but it does not help people to use OCaml as 
a tool. Hence if the community wants this improved then they must improve it 
themselves. That means either forking OCaml or starting afresh.

> Although is is tempting to propose a solution for IO using phantom
> types, objects or whatnot, I still think the Common Lisp approach
> (using unwind_protect) is an elaborate enough one to avoid most
> problems whilst remaining simple enough to be viable.

Yes. The only difference is syntax and I think that is an important 
difference.

> A great solution in F# might not translate as well in OCaml, or it
> might not translate at all.

I was proposing that we learn from the advancements made in other languages 
rather than referring to porting F# code to OCaml code.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e


  reply	other threads:[~2008-01-28 23:16 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27 13:23 David Teller
2008-01-27 13:52 ` [Caml-list] " Paolo Donadeo
2008-01-27 14:24 ` Yaron Minsky
2008-01-27 19:07   ` David Teller
2008-01-27 21:07     ` Jon Harrop
2008-01-27 21:47       ` Yaron Minsky
2008-01-28 11:06         ` David Teller
2008-01-28 12:04         ` Jon Harrop
2008-01-28 12:31           ` David Teller
2008-01-28 14:23           ` Brian Hurt
2008-01-28 15:15             ` Loup Vaillant
2008-01-28 15:40               ` Brian Hurt
2008-01-28 19:46                 ` Jon Harrop
2008-01-28 15:25             ` Jon Harrop
2008-01-28 16:06               ` Christophe TROESTLER
2008-01-28 16:20                 ` Nicolas Pouillard
2008-01-28 16:45                   ` Christophe TROESTLER
2008-01-28 16:51                     ` Olivier Andrieu
2008-01-28 19:58                       ` Jon Harrop
2008-01-29  7:51                   ` Gordon Henriksen
2008-01-28 20:49                 ` Jon Harrop
2008-01-28 22:05                   ` Till Varoquaux
2008-01-28 23:10                     ` Jon Harrop [this message]
2008-01-28 16:37               ` Brian Hurt
2008-01-28 17:30                 ` David Teller
2008-01-28 20:43                   ` Jon Harrop
2008-01-28 21:12                   ` Gerd Stolpmann
2008-01-28 21:39                     ` Jon Harrop
2008-01-29 16:49                       ` Edgar Friendly
2008-01-30  8:52                         ` Sylvain Le Gall
2008-01-30 10:02                           ` [Caml-list] " Jon Harrop
2008-01-30 12:12                           ` Vincent Hanquez
2008-01-28 21:43                     ` [Caml-list] " Dario Teixeira
2008-01-29  7:59                       ` Francois Pottier
2008-01-28 22:07                 ` Arnaud Spiwack
2008-01-27 14:36 ` Michaël Grünewald
2008-01-27 15:10 ` Dario Teixeira
2008-01-28 13:38   ` Sylvain Le Gall
2008-01-28 13:52     ` [Caml-list] " David Teller
2008-01-28  0:23 ` [Caml-list] " Oliver Bandel
2008-01-30  9:43 ` Sylvain Le Gall
2008-01-30 20:25   ` [Caml-list] " blue storm
2008-01-30 20:49     ` Sylvain Le Gall
2008-01-30 20:54       ` [Caml-list] " Eric Cooper

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=200801282310.54770.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=till.varoquaux@gmail.com \
    /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).