You are here: Re: Coding style... « All PHP « IT news, forums, messages
Re: Coding style...

Posted by JDS on 10/13/22 11:36

On Mon, 02 Jan 2006 00:20:45 -0800, Curtis wrote:

> I don't find this as readable/maintainable as lining up
> opening and closing braces the same way I would line up
>
> begin
> begin
> end
> end
>
> in Pascal--especially when things get nested three or four
> levels deep.

Oooh! ooh! I want to weigh in on this one, too!

For me, it is all a matter of *consistency*

As long as everything is coded the same way within an application or group
of related scripts, subtle variations like the ones you note are
unimportant.

When more than one coder is working on a project is when problems arise
with style. *Talk* to each other! Come to a consensus, and try to stick
to it.

And on your first point, about the dropping out of PHP to print HTML, I
think that goes to consistency. If the original coder has done that for
all blocks of HTML, then that is a good reason to stick with that style,
even if it is less legible out of context. But the context is important,
and if it is constent with the rest of the app, then it is, IMO,
acceptable coding style.

later...

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация