Convergence between ocp-indent and ocamlformat styles?

Currently I’m using both ocp-indent and ocamlformat. The former while typing (as the latter requires code that compiles correctly) and the latter, manually in emacs when “I’m done”.

I also read this tweet series by @Yaron_Minsky https://twitter.com/yminsky/status/1005799567042990080

I like the result but I’m quite annoyed by the fact that the two tools indent code in a different way.
I can’t really say which one of these styles is better - to me it doesn’t matter. I think consistency is much more important than “subjective beauty” for people who are willing to sacrifice control for practicality.

So I’m starting this discussion with the idea to “probe” community opinions on the topic. Do you guys think that we, as a community, need to have “one true style”? And do you think it’s worth the effort to try and talk tools developers (and of course, actively help them) into achieving it?

I share you concern but I think the development team is trying to close the gap when possible. See https://github.com/ocaml-ppx/ocamlformat/issues/127#issuecomment-381540819 for some context.

2 Likes