Browse thread
How to refactor a large Ocaml program
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-12-15 (12:34) |
From: | Jan Rehders <cmdkeen@g...> |
Subject: | Re: [Caml-list] How to refactor a large Ocaml program |
Hi, On 15. Dez 2006, at 08:49, Mattias Waldau wrote: > A nice thing would be to be able to navigate the program, i.e. > > 1. Goto to definition (Ctrl-B in Visual Studio) This is possible with Otags On the utility of a refactoring tool: I believe it would be very useful in OCaml. It doesn't matter that much whether a language is expressive or not, tools doing repetitive work are always a great relieve. Imagine changing the signature of a function in a module type which is realized by several modules which in turn are used all around the program. You don't need bad code to save much time here if the name change is done by a tool in seconds instead of by a programmer in minutes or hours. Apart from that an "extract method"/"pull up let expression" refactoring would be especially useful in OCaml where one uses nested "let" expressions often. I find myself pulling a local function up a level frequently. There is a huge gap between tools which are aware of the program structure and those who are not. Take a language where such tools exist like Java: can anyone who ever got used to IDEA IntelliJ or Eclipse JDT going back to a simple text editor? I even prefer them over Emacs for Java coding. There is so much an IDE can provide if it can work on an AST of the language that you don't want to miss it. Not even in a language like OCaml. Searching references, changing names and structure etc. are things which can be done by the editor/ IDE. A powerful language can do much to improve programmers productivity but it will only reach it's full potential together with equally powerful tools - would anyone program OCaml in MS Notepad? Has anyone tried adding OCaml support for Emacs semantic? This might be a starting point -- Jan