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

Re: Comma in (sub) traits?

Thread Previous
Thomas Sandlaß
March 7, 2005 06:27
Re: Comma in (sub) traits?
Message ID:
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.

TSa (Thomas Sandlaß)

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About