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: Pietro Abate <Pietro.Abate@a...>
Subject: Re: [Caml-list] How to refactor a large Ocaml program
not an answer, but a general comment, maybe also a bit OT ...

On Wed, Dec 13, 2006 at 01:37:55PM +0100, Mattias Waldau wrote:
> I have a large ocaml program and I need to make major changes.
> After using C# with ReSharper in Visual Studio I am bit spoiled :-)
> Having a reliable "Find Usage" feature in the browser is really useful 
> when you start tearing apart a program. It is really nice to be able to 
> go to the definition of a function directly, and find all locations it 
> is used.

the other day I was talking with a friend and during a discussion about
java and visual development tool, he put forward the lack of refactoring
tool as a major obstacle in the adoption of "accademic" programming
languages. 

In java or c# you often end up writing programs that are more then 10K
lines long and composed of many tightly couple modules/components. 
This is because of the verbosity of the language itself and because OOP
make you structure your programs as a graph of object/classes. In this
context, refactoring a program without some aid can be really messy,
time consuming and error prone.

On the other hand, in ocaml, I've never written modules/logical units
bigger than 1K lines, and even if the project can grow very big, the
level of interaction between modules is often confined to the module
interface and changing the name of a function is usually never a big
problem.

To some extent, the lack of visual tool can be justified by this
difference.  Where for java/c# developers (in particular on windows)
visual tool are essential for productivity, ocaml developers often get
way without using anything more than vi/emacs because the programs
written in ocaml are more manageable by a human. For me 10K loc for a
logical unit is the maximum I can hold in my head at once. More then
that drive me crazy and often induces me to re-think my entire
architecture.

Does this match your experience ?

p

-- 
++ Blog: http://blog.rsise.anu.edu.au/?q=pietro
++ 
++ "All great truths begin as blasphemies." -George Bernard Shaw
++ Please avoid sending me Word or PowerPoint attachments.
   See http://www.fsf.org/philosophy/no-word-attachments.html