Browse thread
[Caml-list] Frustrated Beginner
[
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: | 2003-12-24 (10:29) |
From: | skaller <skaller@o...> |
Subject: | Re: [Caml-list] Ocaml syntax. |
On Wed, 2003-12-24 at 08:52, brogoff@speakeasy.net wrote: > > The native ocaml syntax has a bunch of strange inconsistencies. > If I believed that, I'd be using Perl and C++ more than I do. Nope, I think > "hysterical raisins" and human laziness/inertia/risk-avoidance explains a lot. Some of the 'inconsistencies' aren't: an 'arbitrary' decision was made, and the result seems 'inconsistent' only when you're not the beneficiary of the choice made :-) As a comparison, Felix mimics many Ocaml constructions but uses slightly different syntax in some cases. In particular: <statement> ; match .. with .. endmatch if .. then .. else .. endif but I still use let .. in .. unterminated. My opinion is that the endmatch is ugly, longwinded, but otherwise desirable. However, the if/then/else/endif leads to a lot of extra ugly 'endif' keywords for chains, which also force incorrect nesting. The fix of course is to include elif as a suboption. I'm seriously thinking of the equivalent for matches: match .. with ... elmatch .. with .. else .. endmatch and now, the original Ocaml syntax looks simpler .. especially when you consider that 'elif' makes sense in a match, and 'elmatch' makes sense in a conditional ... ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners