|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Coding standards questionComments are requested regarding coding standards in this issue:
http://drupal.org/node/358824 Please comment there rather than replying to this email message, so we can track opinions on the issue; I've sent this message to the Dev list because the issue is in the Doc issue queue, and might not have been noticed by developers. For your reference, the question is on PHP coding style, primarily for themes: <?php print $foo; ?> vs. <?php print $foo ?> (i.e. should one-liners have a trailing semi-colon?) There's nothing in the coding style guidelines (for plugins or themes) that currently addresses this question. Thanks! Jennifer (jhodgdon) |
|
|
Re: Coding standards questionI usually write the ";", because I do a lot of development, and for me,
it has no sens to write an instruction without this to end it. But, as without it works, do what you want. Some people may say that it might be less readable, I just think this is more consistent to write it down. Pierre. On Mon, 2009-06-01 at 16:34 -0700, Jennifer Hodgdon wrote: > Comments are requested regarding coding standards in this issue: > http://drupal.org/node/358824 > Please comment there rather than replying to this email message, so we > can track opinions on the issue; I've sent this message to the Dev > list because the issue is in the Doc issue queue, and might not have > been noticed by developers. > > For your reference, the question is on PHP coding style, primarily for > themes: > <?php print $foo; ?> > vs. > <?php print $foo ?> > (i.e. should one-liners have a trailing semi-colon?) > > There's nothing in the coding style guidelines (for plugins or themes) > that currently addresses this question. > > Thanks! > Jennifer (jhodgdon) > > |
|
|
Re: Coding standards questionQuoting Pierre Rineau <pierre.rineau@...>:
> I usually write the ";", because I do a lot of development, and for me, > it has no sens to write an instruction without this to end it. > > But, as without it works, do what you want. Some people may say that it > might be less readable, I just think this is more consistent to write it > down. > It might not always work depending on the order of statements and the order of included files. Always include the ';' to end the statement is the best choice. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ |
|
|
Re: Coding standards questionThe other reason it's always best to include the ";" is that you can add statements after it easily, and/or move that statement around without having to worry about adding an ';'.
There is a similar question with the "," of the last array member. Victor Kane http://awebfactory.com.ar On Sat, Jun 6, 2009 at 9:49 PM, Earnie Boyd <earnie@...> wrote:
|
|
|
Re: Coding standards questionTotally agree with this statement.
On Sun, 2009-06-07 at 04:38 -0300, Victor Kane wrote: > The other reason it's always best to include the ";" is that you can > add statements after it easily, and/or move that statement around > without having to worry about adding an ';'. > > There is a similar question with the "," of the last array member. > > Victor Kane > http://awebfactory.com.ar > > On Sat, Jun 6, 2009 at 9:49 PM, Earnie Boyd > <earnie@...> wrote: > Quoting Pierre Rineau <pierre.rineau@...>: > > I usually write the ";", because I do a lot of > development, and for me, > it has no sens to write an instruction without this to > end it. > > But, as without it works, do what you want. Some > people may say that it > might be less readable, I just think this is more > consistent to write it > down. > > > > It might not always work depending on the order of statements > and the order of included files. Always include the ';' to > end the statement is the best choice. > > -- > Earnie > -- http://r-feed.com/ -- http://for-my-kids.com/ > -- http://www.4offer.biz/ -- > http://give-me-an-offer.com/ > > > |
|
|
Re: Coding standards questionOn Jun 1, 2009, at 4:34 PM, Jennifer Hodgdon wrote: > Comments are requested regarding coding standards in this issue: > http://drupal.org/node/358824 > Please comment there rather than replying to this email message, so > we can track opinions on the issue; Folks: this email thread is over. The issue has long since been resolved by people who read the first two sentences of the thread and replied at the issue. Thanks, -Derek (dww) |
| Free embeddable forum powered by Nabble | Forum Help |