The brackets are a standard notation that have been used for decades in
documentation I've read going back to the mid-1980s. I would rather see
us have some information available in our meta docs to explain to
readers how to understand them, rather than change to add a bunch of
badges into the middle of syntax definitions.
While I agree that "just because that's how it's always been done" isn't
always the right answer, I think this may be a scenario where tinkering
with it will cause more problems than it solves. If we've only gotten a
few queries on this (I've never heard any at all in a decade working on
MDN), that seems like a very questionable reason to make a change after
doing it the way we've done things for so long, with so few complaints
on the syntax.
I could, though, see having a little (?) icon in the corner of syntax
boxes that could be clicked to pop up an explanation of how to read the
syntax descriptions, to cover the cases where people are confused.
> I thought this is commonly known as syntax for API definitions. For
> example PHP also uses it in its documentation.
> It's ok for me to remove the square brackets, but could we mark the
> parameters differently, somehow, to keep it obvious within the
> definition?
--
Eric Shepherd
Senior Technical Writer
Mozilla Developer Network <
https://developer.mozilla.org/>
Blog:
https://www.bitstampede.com/
Twitter:
http://twitter.com/sheppy
Doodle:
http://doodle.com/the.sheppy