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
Ocaml compiler features
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: ketty <kattlachan@g...>
Subject: Re: [Caml-list] Ocaml compiler features
On 1/16/07, Edgar Friendly <> wrote:
> No, I want to make the following code legal:
> if y = 1 then
>         print_int y;
>         print_int z;
> else
>         print_string "not one"

correct me if i am wrong,

you want this to work like it currently does:
if cond then bla;

and this to work like you describe it:
if cond then bla;
what_about_this; (* ? *)

appart from the what_about_this expression, consider this:
if cond then
bla; if cond2 then bla;
else ... (* which if do this belong to? *)

allthough it is straitforward to say that else always belongs to the
"if" it is closest to, it does add a whole new elemnt of confusion.