At 06:05 PM 6/26/01 -0400, Gross, Stephan wrote:
>Why is this style
>
>if ($x) {
> do this;
> do that;
>}
>
>typically preferred over
>
>if ($x)
>{
>do this;
>do that;
>}
>
This tends to be a hotly debated religious issue. There are people who use
that later abomination. ;-) T
On Tue, 26 Jun 2001, Gross, Stephan wrote:
> Why is this style
>
> if ($x) {
> do this;
> do that;
> }
>
> typically preferred over
>
> if ($x)
> {
>do this;
>do that;
> }
>
> I like the latter example because it's easier to cut and paste the braces
> and everything in between. I
--- iain truskett <[EMAIL PROTECTED]> wrote:
> I use cuddled if what I'm doing would look silly otherwise. e.g.
>
> if ($blah) {
> one line;
> } elsif ($flurp) {
> one line;
> } else {
> one line;
> }
Hey! I think that was the thing that made me switch! =o)
In C I could say
if
* Paul ([EMAIL PROTECTED]) [27 Jun 2001 00:50]:
> --- iain truskett <[EMAIL PROTECTED]> wrote:
> > * Gross, Stephan ([EMAIL PROTECTED]) [26 Jun 2001 22:16]:
[...]
> I always used the second in C, but once I started using Perl and Java
> I kept finding something happening that made it seem more con
--- iain truskett <[EMAIL PROTECTED]> wrote:
> * Gross, Stephan ([EMAIL PROTECTED]) [26 Jun 2001 22:16]:
> > Why is this style
>
> > if ($x) {
> > do this;
> > do that;
> > }
>
> > typically preferred over
>
> > if ($x)
> > {
> >do this;
> >do that;
> > }
I always used the sec
At 06:05 PM 6/26/01 -0400, Gross, Stephan wrote:
>Why is this style
>
>if ($x) {
> do this;
> do that;
>}
>
>typically preferred over
>
>if ($x)
>{
>do this;
>do that;
>}
>
>I like the latter example because it's easier to cut and paste the braces
>and everything in between. I als
On Tue, Jun 26, 2001 at 06:05:15PM -0400, Gross, Stephan wrote:
> Why is this style
>
> if ($x) {
> do this;
> do that;
> }
This style is also known as The One True Brace Style, popularized by
Kernighan & Ritchie (in _The C Programming Language_). It's also popular
with other languages
* Gross, Stephan ([EMAIL PROTECTED]) [26 Jun 2001 22:16]:
> Why is this style
> if ($x) {
> do this;
> do that;
> }
> typically preferred over
> if ($x)
> {
>do this;
>do that;
> }
> I like the latter example because it's easier to cut and paste the
> braces and everything in b
On Tue, Jun 26, 2001 at 06:05:15PM -0400, Gross, Stephan wrote:
> Why is this style
>
> if ($x) {
> do this;
> do that;
> }
>
> typically preferred over
>
> if ($x)
> {
>do this;
>do that;
> }
>
> I like the latter example because it's easier to cut and paste the braces
> a
Why is this style
if ($x) {
do this;
do that;
}
typically preferred over
if ($x)
{
do this;
do that;
}
I like the latter example because it's easier to cut and paste the braces
and everything in between. I also think it looks better. But none of the
top programmers ever see
10 matches
Mail list logo