Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to refactor a large Ocaml program
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Mattias Waldau <mattias.waldau@a...>
Subject: Re: [Caml-list] How to refactor a large Ocaml program
I agree that the smaller size of Ocaml programs makes them more 
manageable, however it doesn't solve all problems. My experience from 
doing refactoring like this is that you end up with a non-compiling 
program for a while, and in a day or two, your programs works well again.

A "real" refactoring tool requires parsers, lexer etc, and I am not sure 
Ocaml syntax is very good for doing this kind of parsing on 
non-compiling code. (A side note, are there any programming language 
defined whose syntax has been designed so that fragments can be parsed?).

However, a simple solution is to improve the .annot files as described 
in the previous entry, so that we at least can analyze compiled programs.

> Am Mittwoch, den 13.12.2006, 15:00 +0100 schrieb Yann Coscoy:
>> My opinion is that you are right when you say that ocaml programs are
>> often shorter than Java one. However, I have the feeling that you are
>> over-enthusiastic about manageability of ocaml programs.
> 
> Well, it is certainly possible to write Ocaml programs that turn out to
> be unmanageable. My experience (which is currently a 53 kloc commercial
> project) is different, however. We are refactoring all the time, and it
> is no big deal.
> 
> Ok, we are only refactoring from "good design A" to "good design B", and
> not from a bad design to a hopefully better design.