Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 <> 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.