Disclaimer: this post is purely about minor matters of syntax aesthetics. If you don’t want to spend any time on this, please move on to another topic.
Having said that, I’ve always been bothered by how ugly ppx extensions look:
let%lwt x = Lwt.return 1 just seems really unattractive and messy to me – almost unreadable. However, I just realized we can use
let %lwt x = Lwt.return 1 instead, which to my eye looks so much better. We could even add spacing on both sides, with
let % lwt x = Lwt.return 1, but I feel that this is overkill, since it looks too much like an operator, and the extension looks like a variable.
I realize this is essentially a no-op, since the parser already supports spaces, but I’d love for the default formatting to switch to the 2nd version, which is far more elegant and makes ppx extensions look like a proper part of the language.
What do you guys think?