develooper Front page | perl.perl6.language | Postings from October 2001

Re: Perl 6 - Cheerleaders?

Thread Previous | Thread Next
From:
Larry Wall
Date:
October 29, 2001 14:06
Subject:
Re: Perl 6 - Cheerleaders?
Message ID:
200110292206.OAA15268@wall.org
siracusa@mindspring.com writes:
: >   method INIT ($fooval, $barval)
: >   {
: >     $.foo = $fooval;
: >     $.bar = $barval;
: >   }
: 
: (sorry, couldn't help fixing the braces... ;)

I don't really care where you put the initial brace, as long as you
outdent the closing brace.  My personal brace style does

    foo {
	...
    }

when foo is short enough to fit on one line, but

    bar
    {
	...
    }

if bar is going to be be split over multiple lines.  So even I would
put the bracket on its own line for this:

    method INIT (Dog $fooval is bowwow(3) woof(2) wag(1,2,3),
		 Cat $barval is ack(0.5) pfft(9) )
    {
	$.foo = $fooval;
	$.bar = $barval;
    }

On the other hand, I save a lot of relatively useless whitespace by not
doing that consistently.  Of course, if I was paid by the line...

Larry

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About