Version franaise
Home About Download Resources Contact us
Browse thread
new emacs tuareg mode release
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Mehdi Dogguy <mehdi.dogguy@p...>
Subject: Re: [Caml-list] new emacs tuareg mode release
On 26/05/2010 12:02, Tom Hutchinson wrote:
> I would be most interested to hear answers to this e-mail.
> 

Me too. It would be nice if tuareg's upstream could summarize some points
to show the difference. That would help!

> I too have wondered about the differences between tuareg mode and caml 
> mode.
> 

I use only two features in tuareg-mode which are syntax coloring and
indentation (and from time to time, caml-show-types from caml-mode when
debugging). So my remarks (below) might not be complete but should be
enough (IMHO) for most of users to get an idea of the difference (for a
daily use):

- colors:

  * caml-mode doesn't colorize mll files as good as tuareg-mode: open any
    .mll file and look at any "rule foo bar = parse", it's all black. rules
    are functions, so they should be colorized the same way.
  * in caml-mode, functions and arguments have the same colors (when
    defining functions).
  * some operators are not colorized in caml-mode (e.g. "::"). I didn't
    check all of them, only "::"… but that's enough for me to not use
    caml-mode because, visually, "a::b" looks like a single block and
    might be harder to read (or to detect the structure when the expression
    if more complicated), which is not very nice.

  * in tuareg-mode 2.0, "let" and "open" statements (and some others) are
    bold and blue. I found that change quite surprising. It keeps my eyes
    clipped on them. They contrast too much with the other colors used.
  * in tuareg-mode 2.0, in mll files, rules are now harder to read because
    it uses mainly red (for symbols, let's say) and light brown for strings
    (as usual) and the contrast between these two colors is too low. It
    used to be dark purple and light brown which is (not perfect, but at
    least)a better default setting, IMHO.

  * For mly files, they provide almost the same coloring.

- indentation: they simply have different defaults. caml-mode sticks to
  the recommendations listed on ocaml's website, AFAIK, which is nice.
  Indentation is configurable in both modes and is a matter of taste.

- other features (ocamldebug, toplevel, …): almost the same, but with
  different names. Maybe there are some tiny differences here, but they
  don't pop up.

It might obvious for some people but, apparently, maybe not for who set
the new default colors, but syntax coloring is used to show in a *clear*
way the structure of the code. From what I see, they both fail to provide
a good syntax coloring. tuareg-mode 1.xx used to have better defaults.

Some people might consider my remarks as nipticking, and I can understand
that (since I can change these settings). But, tuareg-mode used to have
good defaults and failing at such a basic features for such a program is
completely crazy. Besides, I appreciate the efforts done from both sides and
I hope that they'll get better soon.

Regards,

-- 
Mehdi Dogguy مهدي الدڤي
http://www.pps.jussieu.fr/~dogguy