develooper Front page | perl.perl6.language | Postings from March 2005

Re: Comma in (sub) traits?

Thread Previous
From:
Thomas Sandlaß
Date:
March 7, 2005 06:27
Subject:
Re: Comma in (sub) traits?
Message ID:
422C64B3.4050107@orthogon.com
wolverian wrote:
> There are other ways to format the declaration, like indenting the
> traits line:

Yes, I like:
      sub greeting( Str $person )
          returns Str
          is export
      {
          "Hello, $person"
      }

With the sub-line as some kind of intro and the block as the terminator.
A longer signature would be aligned after the opening paren---and along
the zone markers.

Regards,
-- 
TSa (Thomas Sandlaß)




Thread Previous


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