Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
      ...
   else
      ...

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

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


-------------------
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