Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

MfG
        Goswin