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: | Christophe TROESTLER <Christophe.Troestler@u...> |
| Subject: | Re: [Caml-list] Ocaml compiler features |
On Mon, 15 Jan 2007, Edgar Friendly <thelema314@gmail.com> wrote: > > Richard Jones wrote: > > On Fri, Jan 12, 2007 at 11:37:21PM -0600, Edgar Friendly wrote: > >> if y=1 then > >> let z = 2 in > >> print_int y; > >> print_int z; > >> else > >> print_string "not one" > > > > Hmmm .. changing the precedence of operators to avoid two parentheses ... > > I don't think that's good. > > No, I want to make the following code legal: > > if y = 1 then > print_int y; > print_int z; > else > print_string "not one" > > It's just an unnecessary stumbling block for programmers coming from > other languages. Just pretend parentheses are compulsory :). (What would happen in C if we left the braces out anyway! Go and change C instead, this will affect far more people!) BTW, learning a language by saying you want to change it (before you even did any interesting programming in it) is not IMHO the most beneficial attitude. It is really kind of you to want to help us to "improve the world of ocaml" but shouldn't you learn the language inside out and write two or three projects in it first ? My 2^(-10)¤ (with or without parentheses), C.