Re: How to write code: how wrong am I?
| From: | tedd | Date: | Fri, 25 Feb 2011 18:58:03 +0000 |
| Subject: | Re: How to write code: how wrong am I? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311580@lists.php.net to get a copy of this message | ||
At 11:04 AM -0700 2/22/11, Alexis wrote:
On 22/02/11 09:40, Dotan Cohen wrote:I agree with Alexis. Furthermore, I place braces on their own lines AND I do it in all languages I program in, such as CSS, PHP, JavaScript, and others. Cheers, tedd -- ------- http://sperling.com/On Tue, Feb 22, 2011 at 16:15, Robert Cummings<robert@interjinn.com> wrote:Well the way you do it, drives me nuts :) Morale of the story, do whatever *you* are most comfortable with..personally I indent as well, has it's downsides I admit, but it's what I've done for the last 20 years and I'm comfortable with it. AlexisIf you switch to vertically aligned braces you will have an easier time matching up open and close braces... if (something) {That bracing style drives me nuts! But I have no problem scanning a single axis for the close brace and any statement, be it an if, while, switch, or something else.// Code here} It's trivial to match using this style since you only need to scan one axis.