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
Aaron Sherman
March 30, 2005 10:52
Re: Parameter and trait questions - just how 'only' _is_'read-only'?
Message ID:
On Wed, 2005-03-30 at 13:17, Thomas SandlaƟ wrote:
> HaloO Luke,
> you wrote:
> > No, I think I agree with you here.  But what happens if you change
> > you're second-to-last line to:
> > 
> >     my $a = foo();
> >     $a.meth() = 8;
> > 
> > Perl 6 is both a statically typed language and a dynamically typed
> > language, and the problems that I am addressing are mostly about the
> > dynamic part.
> My state of affairs is that these two lines of code lack declarations
> that clearly announce what the user of foo and X wanted:
> 1) &foo returns an X

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.

Given that, Luke was making the point that $a had not explicit type.

Aaron Sherman <>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback

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