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=1.4 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 12EFEBC0B for ; Wed, 13 Dec 2006 14:51:36 +0100 (CET) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBDDpYpF026256 for ; Wed, 13 Dec 2006 14:51:35 +0100 Received: by an-out-0708.google.com with SMTP id c24so24613ana for ; Wed, 13 Dec 2006 05:51:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=AcI7akBN4+0ox3ed0RNUtNBOkdjlQNEzNSLdpgBSjmAfxFeVj+1h/ObPnt29aXiXEMfMv3n2lWhlT2OagPEev42Jow7w/VTA+SaHtf7R3qziXVYe0TMUO7v0XGJwdOLJJTavBlLL+aFLEqd6EuUB9Dwp1gSUGz0ZXhUWSXfudmI= Received: by 10.78.170.17 with SMTP id s17mr671425hue.1166017893375; Wed, 13 Dec 2006 05:51:33 -0800 (PST) Received: by 10.78.129.9 with HTTP; Wed, 13 Dec 2006 05:51:33 -0800 (PST) Message-ID: Date: Wed, 13 Dec 2006 08:51:33 -0500 From: "Jim Miller" To: "Mattias Waldau" Subject: Re: [Caml-list] How to refactor a large Ocaml program Cc: caml-list@yquem.inria.fr In-Reply-To: <457FF423.7000703@abc.se> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_135248_10159301.1166017893344" References: <457FF423.7000703@abc.se> X-j-chkmail-Score: MSGID : 45800566.002 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45800566.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; refactor:01 ocaml:01 ocaml:01 compiler:01 ocaml's:01 compiler:01 dependencies:01 mattias:01 waldau:01 mattias:01 waldau:01 emacs:01 otags:01 emacs:01 beginner's:01 ------=_Part_135248_10159301.1166017893344 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline This is where I think I enjoy the test driven design that I've followed over the past few years (I guess the agile folks have taken it as their own). I don't use any development tools for any language (java or Ocaml) and depend on the compiler. (I also take refactoring to mean that you're changing the design of a piece of software that's resident behind a module or class interface.) I then start refactoring making sure that I'm running the tests at almost every compile to make sure that I didn't break something. I do everything from clean compiles (Ocaml's compiler is nice and fast) so that the compiler will tell me everywhere that a function is used. This has worked for me but I will also say that I pay very strong attention to module interdependencies (Large Scale C++ Software Design by John Lakos makes some great arguments that directly apply to Ocaml as well) so I'm able to track my dependencies pretty easily. Good luck On 12/13/06, 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. > > However, when I go back to Ocamlm, Emacs and Otags and -dtypes doesn't > give a lot of help except the types. > > For example Emacs "Find-tag" on Std.left, which find the following > functions: > > left, margin_left,...... > > Do anyone know about better ways of doing this? > > -- Mattias > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > ------=_Part_135248_10159301.1166017893344 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline This is where I think I enjoy the test driven design that I've followed over the past few years (I guess the agile folks have taken it as their own).  I don't use any development tools for any language (java or Ocaml) and depend on the compiler.

(I also take refactoring to mean that you're changing the design of a piece of software that's resident behind a module or class interface.)

I then start refactoring making sure that I'm running the tests at almost every compile to make sure that I didn't break something.  I do everything from clean compiles (Ocaml's compiler is nice and fast) so that the compiler will tell me everywhere that a function is used.

This has worked for me but I will also say that I pay very strong attention to module interdependencies (Large Scale C++ Software Design by John Lakos makes some great arguments that directly apply to Ocaml as well) so I'm able to track my dependencies pretty easily.

Good luck

On 12/13/06, Mattias Waldau <mattias.waldau@abc.se> 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.

However, when I go back to Ocamlm, Emacs and Otags and -dtypes doesn't
give a lot of help except the types.

For example Emacs "Find-tag" on Std.left, which find the following
functions:

left, margin_left,......

Do anyone know about better ways of doing this?

-- Mattias

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

------=_Part_135248_10159301.1166017893344--