From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 2314DBC0B for ; Wed, 13 Dec 2006 14:06:57 +0100 (CET) Received: from mail.rsise.anu.edu.au (mail.rsise.anu.edu.au [150.203.208.4]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBDD6qu6022283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 13 Dec 2006 14:06:56 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.rsise.anu.edu.au (Postfix) with ESMTP id 5300053FC5 for ; Thu, 14 Dec 2006 00:06:45 +1100 (EST) Received: from mail.rsise.anu.edu.au ([150.203.208.4]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 14536-05 for ; Thu, 14 Dec 2006 00:06:45 +1100 (EST) Received: from pulp.rsise.anu.edu.au (pulp.rsise.anu.edu.au [150.203.208.49]) by mail.rsise.anu.edu.au (Postfix) with ESMTP id 2E20053FA3 for ; Thu, 14 Dec 2006 00:06:45 +1100 (EST) Received: by pulp.rsise.anu.edu.au (Postfix, from userid 1560) id 40E5AA9D13E; Thu, 14 Dec 2006 00:09:22 +1100 (EST) Date: Thu, 14 Dec 2006 00:09:22 +1100 From: Pietro Abate To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] How to refactor a large Ocaml program Message-ID: <20061213130922.GA17914@pulp.rsise.anu.edu.au> References: <457FF423.7000703@abc.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <457FF423.7000703@abc.se> X-Operating-System: GNU/Linux X-Organization: Research School of Information Science and Engineering (Australian National University) User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mail.rsise.anu.edu.au X-Miltered: at concorde with ID 457FFAEC.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; refactor:01 ocaml:01 0100,:01 mattias:01 waldau:01 ocaml:01 emacs:01 blog:98 blog:98 wrote:01 graph:01 caml-list:01 oop:01 modules:02 modules:02 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