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

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

Thread Previous | Thread Next
March 30, 2005 13:14
Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?
Message ID:
Aaron Sherman wrote:
> No, that was most of the point. &foo did not declare a return type, and
> while my code was simplistic, we obviously cannot be certain what &foo
> might return in the general case.

Sorry that I've spoiled that. But I wonder if it's just in the examples
here on the list or a general laxity to not specify a return type of
subs and methods. I consider leaving it to the compiler to infer it bad
style. BTW, what is the default return type? Just Void? Is an explicit
return statement than a compile error?
TSa (Thomas SandlaƟ)

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