RE: [PHP] Better standards in PHP-coding
| From: | Maxim Maletsky | Date: | Mon, 22 Apr 2002 00:07:28 +0000 |
| Subject: | RE: [PHP] Better standards in PHP-coding | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93924@lists.php.net to get a copy of this message | ||
I think standardization within the company is what important.
I prefer tabs because when I have to delete a part of the line, I just
hit back button once - not four times.
But anyhow, programming style is the personal preference for every
programmer. There recommendations and team-wise standards, but that has
nothing to do with the general idea.
Sincerely,
Maxim Maletsky
Founder, Chief Developer
maxim@phpbeginner.com
PHPBeginner.com (Where PHP Begins)
www.phpbeginner.com
> -----Original Message-----
> From: Martin Towell [mailto:martin.towell@world.net]
> Sent: Monday, April 22, 2002 1:57 AM
> To: php-general@lists.php.net
> Subject: RE: [PHP] Better standards in PHP-coding
>
> (Just got back from the weekend)
>
> Just my 2c worth
>
> IMHO, as long as the code is indented "properly", it doesn't matter
where
> the braces are, just be consistant. Personally, I prefer to put the
opening
> brace on a new line, but I can just as easily read other people's code
when
> the opening brace is on the same line (as long as it's indented
properly).
>
> As for indenting - I prefer using spaces and this ensures that my code
will
> look the same in someone else's editor as it does in mine. There are
people
> here, in the company, that use tabs and have set their tabs to be 4
spaces,
> I have my tabs set to 8 spaces - really plays havoc when they indent
quite a
> distant :(
>
> Also, with one line statements, I prefer to place it on the same line
as the
> statement that requires it (ie, function, if/else, while, do, etc).
But,
> again, as long as the coder is constant, I find it just as readable
when the
> statement is on a new line, surrounded by braces or not.
>
> So what I'm basically saying is - choose a style that suits you, and
be
> _consistant_ with it - oh, and make sure you indent your code, there's
> nothing worse than trying to read code that's not indented, or
indented all
> over the place!
>
> Martin
>
>
> -----Original Message-----
> From: Tom Rogers [mailto:trogers@kwikin.com]
> Sent: Sunday, April 21, 2002 9:10 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Better standards in PHP-coding
>
>
> Hi
> I like the following form, not sure how much time gets wasted in
parsing
> but it's easy > for me < to follow :)
>
> while(something):
> if(something else):
> yada;
> else:
> forget it;
> endif;
> endwhile;
>
> Tom
>
>
> At 11:51 AM 21/04/2002, Frank wrote:
>
> >"The nice thing about standards is that there are so many to choose
> between".
> >
> >Subject: Uses of block markers in coding
> snip
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php