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
[Caml-list] Function forward declaration?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-07 (17:54)
From: Marcin 'Qrczak' Kowalczyk <qrczak@k...>
Subject: Re: [Caml-list] Function forward declaration?
W li¶cie z ¶ro, 07-04-2004, godz. 18:36 +0100, Richard Jones napisa³:

> Well the very specific problem is that tuareg-mode doesn't indent like
> this.  The indenting probably should reflect the actual structure of
> the code.

I believe "let ... in" and "if ... then ... else" should not necessarily
increase the indentation level, even though syntactically they open a
new level of nesting. It's not Lisp, we don't have an additional ")" to
close at the end :-)

Unfortunately perfect indentation is not automatically deducible from
the list of tokens. The natural OCaml style of finding the right
condition among many:

   if ... then
   else if ... then
   else if ... then

or with a newline in each "else if" pair, looks better when all branches
are indented the same amount.

   __("<         Marcin Kowalczyk

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: