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: Jim Miller <gordon.j.miller@g...>
Subject: Re: [Caml-list] How to refactor a large Ocaml program
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
>