caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jan Rehders <cmdkeen@gmx.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] How to refactor a large Ocaml program
Date: Fri, 15 Dec 2006 13:36:33 +0100	[thread overview]
Message-ID: <5623CFF1-BF07-440F-AA1C-6B13BB158C5C@gmx.de> (raw)
In-Reply-To: <45825396.4020900@abc.se>

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



  reply	other threads:[~2006-12-15 12:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13 12:37 Mattias Waldau
2006-12-13 13:09 ` [Caml-list] " Pietro Abate
2006-12-13 13:46   ` Jon Harrop
2006-12-13 13:53   ` skaller
2006-12-13 13:57   ` Richard Jones
2006-12-13 14:00   ` Yann Coscoy
2006-12-13 14:09     ` Jon Harrop
2006-12-13 14:31       ` Yann Coscoy
2006-12-13 14:42       ` Mattias Engdegård
2006-12-13 16:48     ` Gerd Stolpmann
2006-12-13 17:08       ` Jon Harrop
2006-12-13 13:51 ` Jim Miller
     [not found] ` <45800CD5.8050401@janestcapital.com>
2006-12-14  8:09   ` Mattias Waldau
2006-12-14 11:59     ` Bruno De Fraine
2006-12-14 13:47     ` Brian Hurt
2006-12-15 15:33       ` Florian Hars
2006-12-16 10:14         ` Remi Vanicat
2006-12-16 13:53           ` Christian Stork
2006-12-18 19:37           ` Florian Hars
2006-12-15  5:07     ` Jacques Garrigue
2006-12-15  7:49       ` Mattias Waldau
2006-12-15 12:36         ` Jan Rehders [this message]
2006-12-15 13:11           ` skaller
2006-12-14  8:21   ` Mattias Waldau
2006-12-15 17:23 ` malc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5623CFF1-BF07-440F-AA1C-6B13BB158C5C@gmx.de \
    --to=cmdkeen@gmx.de \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).