Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] how to upset the ocaml type system....
Date: Wed, 29 Aug 2007 16:58:16 +0200	[thread overview]
Message-ID: <1188399496.46d589880d7a3@webmail.in-berlin.de> (raw)
In-Reply-To: <46D55122.2090709@univ-savoie.fr>

Zitat von Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>:

> Daniel de Rauglaudre a écrit :
> > Hi,
> >
> > On Tue, Aug 28, 2007 at 11:18:50PM +1000, Pietro Abate wrote:
> >
> >
> >> the other day I was looking for a fringe case to show me the worst
> >> complexity of the type inference algorithm...
> >>
> >
> > Interesting. To see the resulting time, I changed the code into:
> >
> >   let f =
> >   let x1 = fun x -> (x,x) in
> >   let x2 = fun y -> x1 ( x1 y ) in
> >   let x3 = fun y -> x2 ( x2 y ) in
> >   let x4 = fun y -> x3 ( x3 y ) in
> >   let x5 = fun y -> x4 ( x4 y ) in
> >   x5 ( fun z -> z ) ;;
> >
> >
> This is strange, it is problematic even with -rectypes while this is
> not necessary if the subtypes are shared ... I already so ocaml
> printing some types with sharing, so why is this not the case here ?
> (I am using 3.09.2)
[...]

Sorry, if I can't follow why this discussion was started.
Is this a purely-academic talk, or does it have any relevance
for programmers who want to solve a programming problem?

Where could the problem behind this kind of functions
occure in practical programming?

I tested the above code and it needed a lot of time
to execute in the toplevel. I stopped this then, before the
toplevel were ready.

I never had such a behavior of so long needed time
for any kind of code.
So I doubt that this is a problem that matters in the realworld.
But possibly I'm wrong. Can you please elaobrate on this?
Is this more than a academic mental exercise?

Ciao,
   Oliver


  reply	other threads:[~2007-08-29 14:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-28 13:18 Pietro Abate
2007-08-28 21:21 ` [Caml-list] " David Allsopp
2007-08-29  0:56 ` Daniel de Rauglaudre
2007-08-29 10:57   ` Christophe Raffalli
2007-08-29 14:58     ` Oliver Bandel [this message]
2007-08-29 15:48       ` Daniel de Rauglaudre
2007-08-29 16:15     ` Christophe Raffalli

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=1188399496.46d589880d7a3@webmail.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --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