English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: Why is this not allowed?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-12-02 (14:11)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: Why is this not allowed?
>From: Claudio Sacerdoti Coen <sacerdot@students.cs.unibo.it>
>can you explain me why is this not allowed?
>I can't see a problematic counterexample.
># let rec id'' = id;;
>This kind of expression is not allowed as right-hand side of `let rec'

Because we don't know how to compile "let rec x = x" or
  let rec x = y
  and y = x

Moreover, you can just remove the "rec" and it works.  It is possible
to implement "let rec var1 = var2", but the usefulness is quite small
compared to the amount of code we would need to write.

-- Damien