Browse thread
Ocaml compiler features
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 |
Hi, On 1/13/07, Edgar Friendly <thelema314@gmail.com> wrote: > Would it really be enough to raise the precedence of ; higher > than that of if/then? Is there any reason this hasn't been done already? and On 1/13/07, David Baelde <david.baelde@gmail.com> wrote: > It may be useful to note that some people might want to write code like: > > foo ; > x <- if y then a else b ; > bar ; > > In that example bar is really meant to be outside the if-then-else. I think the biggest consern is that the else clause is optional. So you can write code like this: if condition then do_something (); (* no trailing else clause *) do_something_else (); (* this is outside the if expression ') ...etc...