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
Why is this allowed?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-06-09 (15:11)
From: Goswin von Brederlow <goswin-v-b@w...>
Subject: Re: [Caml-list] Why is this allowed?
Jacques Carette <carette@mcmaster.ca> writes:

> Nice trick - but my 'problem' [1] regards arbitrary valid OCaml code
> and how to serialize code values.  The issue seems to be that one
> needs to attach an arbitrarily large typing environment to each part
> of a value, as there is no global typing environment which will do the
> job (because of shadowing).
> Jacques

This is no different from

let x = 1
let x = 2

Shadowing is totally allowed in ocaml.