Issues

ZF-2509: One True Brace form... or is it?

Issue Type: Docs: Problem Created: 2008-01-27T14:34:36.000+0000 Last Updated: 2008-12-30T06:59:48.000+0000 Status: Closed Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Sander Bol (tubularbell) Assignee: Wil Sinclair (wil) Tags: Related issues: - ZF-691

Attachments:

Description

From: http://framework.zend.com/manual/en/…

"The brace is always written on the line underneath the class name ("one true brace" form)."

This statement seems to go against common knowledge, as shown in The Jargon File and Wikipedia on this subject - One True Brace is usually used to refer to having the brace on the same line as the class (or function, or whatever) that the block belongs to.

Source of this confusion is probably the PEAR Coding Standard - PEAR uses One True Brace (or "K&R") Style for its functions, not its classes. Earlier versions of the PEAR CS show that they refered to their way of marking up functions, which is the form known as "One True Brace" according to the earlier mentioned sources, as "One True Brace" earlier, but have now switched over to "K&R".

They do not explicitly name their (and our) standard for classes - it is described as "Allman" style, though.

Comments

Posted by Sander Bol (tubularbell) on 2008-01-27T14:43:23.000+0000

Corrected terminology - looks like PEAR is not talking about Classes when they say One True Brace or K&R.

Posted by Ralph Schindler (ralph) on 2008-03-21T10:40:25.000+0000

linking for resolution

Posted by Wil Sinclair (wil) on 2008-04-18T17:07:22.000+0000

Please evaluate and categorize/assign as necessary.

Posted by Ralph Schindler (ralph) on 2008-04-22T11:33:42.000+0000

Updating project management info.

--

Currently working on the task linked to this one.

Posted by Wil Sinclair (wil) on 2008-06-15T21:19:27.000+0000

Updating to comply with new IT component conventions.

Posted by Wil Sinclair (wil) on 2008-11-25T13:03:48.000+0000

Deleted all references to 'one true brace' in the coding standards. We've got better things to do than come to consensus on what that phrase means. :)

Fixed on trunk with r12839.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts