ocaml / tuareg

Emacs OCaml mode
GNU General Public License v3.0
360 stars 79 forks source link

Document the differences between tuareg and caml-mode #298

Open bbatsov opened 1 year ago

bbatsov commented 1 year ago

I've noticed this topic is generating a lot of confusion (see https://discuss.ocaml.org/t/tuareg-and-caml-modes-for-emacs-what-are-the-differences/10285). Both modes are very similar at a glance:

It'd be really nice if the README explained what are the exact advantages of tuareg over caml-mode. I know that the indentation is smarter and based on SMIE, but I'm not sure about the rest.

Chris00 commented 1 year ago

I don't use caml-mode so cannot really compare. (IMHO, the two should be merged — I cannot do it due to lack of time.)

bbatsov commented 1 year ago

@monnier Are you familiar with the differences?

IMHO, the two should be merged — I cannot do it due to lack of time.

Yeah, I think that'd be prudent. I'm still a bit confused by the dependency that tuareg has on caml-mode, as it seems it uses very little things from it. Perhaps the easiest path forward would be to deprecated caml-mode and start inlining whatever's needed in Tuareg.

bbatsov commented 1 year ago

caml-mode (available in NonGNU ELPA and MELPA) is used to display types (using the obsolete *.annot files), open a module for documentation,...

I'm guessing we can probably remove this usage of caml-types now that pretty much everyone's using Merlin or OCaml-LSP.

Chris00 commented 1 year ago

I'm guessing we can probably remove this usage of caml-types now that pretty much everyone's using Merlin or OCaml-LSP.

That's certainly something to discuss (I tend to be somewhat conservative for the users 😁). We would also just copy the file.

bbatsov commented 1 year ago

Yeah, I guess copying caml-types.el would be a relatively simple thing to do, as at a glance the file is self-contained.