Talk:Brace matching

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Should we name this article "brace matching" or "braces matching"? Obuibo Mbstpo (talk) 14:33, 9 March 2008 (UTC)

Need much more on history[edit]

Brace matching is very old (~25 years), predating C++, Java, or IDEs, and this article needs a lot more discussion of that. Some of the things I remember which would be worthy of inclusion:

  • Not just a feature of IDE's; many plain text editors could also do this.
  • emacs (and its many variants and clones) have had brace/parenthesis matching since the early 1980s. As this predated most color displays, it did this at least three different ways (that I've seen); by highlighting the matching brace in reverse text; by momentarily "flashing" the cursor over the matching brace; and when the matching brace is more than a screen-full away by showing the line containing the matching brace in the editor's status line. It also has a lot of navigation support, moving the cursor between matching braces, narrowing the view to include just the portion inside a set of matching braces, outline modes where text inside matching braces is collapsed.
  • The lisp machine text editor would indicate matching parenthesis (which is arguably a much more important editing problem in Lisp than in nearly any other language) by underlining the region of text between the matching braces indicated by your cursor position.
  • "electric braces", a feature of emacs but which I believe some other editors also emulated, in which mismatched braces were either highlighted or automatically corrected, as well as fixing indentation based on brace nesting.

Unfortunately I don't have ready references at the moment, and would appreciate other who can provide verifiable evidence. -- Dmeranda (talk) 16:38, 10 March 2008 (UTC)

Implementation on Mediawiki[edit]

There is currently bug 13302 suggesting implementation of brace matching on Mediawiki. Obuibo Mbstpo (talk) 17:01, 10 March 2008 (UTC)

Controversy section[edit]

I removed the controversy section because I didn't feel it was relevant to this article. That topic is already covered in other articles, such as in Off-side rule and Curly bracket programming language. -- Dmeranda (talk) 04:41, 11 March 2008 (UTC)

Terminology[edit]

I have always seen and heard this referred to as "bracket matching" (e.g. jEdit: documentation). This makes more sense to me, because "bracket" is the more generic term: it can refer to round, square or curly brackets. "Brace", on the other hand, is used to refer only to curly brackets.

If this is uncontroversial, I will be bold and move the page.Jchthys 15:09, 10 July 2013 (UTC)

I agree to the move, though for slightly different reasons. "Brace" and "bracket" have different uses in US/UK and elsewhere, so it's hard to say which is "correct". However, our own Wikipedia has Braces (punctuation) redirect to Bracket, which includes square and curly brackets, as well as parens. The name of this article should follow that decision. --A D Monroe III (talk) 22:16, 15 August 2014 (UTC)