Don't allow whitespace everywhere
@markusicu wrote in https://github.com/unicode-org/message-format-wg/pull/230#issuecomment-1116903103:
Please don't allow whitespace everywhere. Traditional programming languages are super loose with spaces, but then people debate and enforce style guides for where to put them. Looking at my example above, I suggest not allowing spaces where I didn't put any. (For example, not around the =.)
We shouldn't punish users when they don't get the whitespace right because (my hypothesis is that) people don't give whitespace the same amount of thought as they do to non-whitespace content. Whitespace is the padding between more interesting content. That's why in my work so far I've attempted to design a syntax in which all whitespace outside translatable content is not significant. Whether you write {$arg :func opt=val} or {$arg :func opt = val}, it should work the same way.
That said, I'm all for agreeing on a standard style guide and encouraging the use of linters. My personal preference for how to format placeholders is {$arg :func opt=val}, for example.
I agree that {$arg :func opt=val} is good. I am just lobbying for not allowing additional spaces in that placeholder. More optional spaces lead to sub-optimal readability and style fights.
I feel most-to-least strongly in this order:
- not allowing spaces between the
$/:prefixes and the argument/function names - not allowing spaces around
= - not allowing spaces after the placeholder start
{ - not allowing spaces before the placeholder end
}
We've discussed this in the adoption of the abnf and that part of the spec appears to define where whitespace is allowed (we are somewhat permissive). Is there any reason to revisit that?