Re: Final draft: Conventions and Guidelines for Perl Source Code

2001-08-15 Thread H . Merijn Brand
On Tue 14 Aug 2001 00:55, "Espen Harlinn" <[EMAIL PROTECTED]> wrote: > Pardon me for butting in at this late stage :-) > > Since the purpose of coding conventions and guidelines is to make code more > readable to the majority of developers, wouldn't it make sence to settle on > something that can

Re: Final draft: Conventions and Guidelines for Perl Source Code

2001-08-15 Thread Dave Mitchell
I think then we are all agreed that the format is /* comment */ if (...) { ... } /* comment */ else { ... } with mandatory {}s. For completeness, we should also include chained else-ifs; I think the following is reasonably uncontroversial: /* comment */ if (...) { ... } /* comment

Re: Final draft: Conventions and Guidelines for Perl Source Code

2001-08-13 Thread Espen Harlinn
Pardon me for butting in at this late stage :-) Since the purpose of coding conventions and guidelines is to make code more readable to the majority of developers, wouldn't it make sence to settle on something that can be processed by a utility like gnu indent ??? This way developers could use a

Re: Final draft: Conventions and Guidelines for Perl Source Code

2001-08-13 Thread Uri Guttman
> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes: >> BTW, I am not sure it has been mentioned already. We should enfore >> {} even for single line block. Since we use plenty of macros that >> may be expanded to multi lines, it is much safer and consistent >> to always use {}. DS>

RE: Final draft: Conventions and Guidelines for Perl Source Code

2001-08-13 Thread Dan Sugalski
At 11:58 AM 8/13/2001 -0700, Hong Zhang wrote: >This style is not very consistent, > > if (...) { > > ... > > } > > else > > { > > ... > > } > >I believe it would better be > >/* comment */ >if (...) { > ... >} >/* comment */ >else { > ... >} Yes, absolutely. Being able to put meaningfull

RE: Final draft: Conventions and Guidelines for Perl Source Code

2001-08-13 Thread Hong Zhang
I believe the advantage of > if (...) { > ... > } else { > ... > } is to write very dense code, especially when the block itself is single line. This style may not be readable to some people. This style is not very consistent, > if (...) { > ... > } > else > { > ... > } I believe it w

Re: Final draft: Conventions and Guidelines for Perl Source Code

2001-08-13 Thread Joe McMahon
On Mon, 13 Aug 2001, Dave Mitchell wrote: > Nicholas Clark <[EMAIL PROTECTED]> wrote: > > Does this mean avoid: > > > > if (...) { > > ... > > } else { > > ... > > } > > > > and instead use: > > > > if (...) { > > ... > > } > > else > > { > > ... > > } > > > > If my interpretation of what

Re: Final draft: Conventions and Guidelines for Perl Source Code

2001-08-13 Thread Dave Mitchell
Nicholas Clark <[EMAIL PROTECTED]> wrote: > > =item * > > > > Uncuddled elses: ie avoid C<} else {> > > Does this mean avoid: > > if (...) { > ... > } else { > ... > } > > and instead use: > > if (...) { > ... > } > else > { > ... > } > > If my interpretation of what it means is cor