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: | Jonathan Roewen <jonathan.roewen@g...> |
| Subject: | Re: [Caml-list] Ocaml compiler features |
> C is interesting because the braces are optional, and people get into > trouble often when they fail to use them. And many people's solution is > to treat the braces as non-optional. I don't think this is as > appropriate in ocaml because parens serve a second use: constructing > tuples. Since if/then returns a value, the difference of ; vs. , > results in a huge difference in what's going on. > > As for changing the C language, 1: it's already written in stone 2: it's > not worth saving, ocaml is. OCaml is mostly fine syntactically, and 'if' isn't a problem. If you don't like using parentheses, use begin/end. Personally, I prefer begin/end anyway. Jonathan