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
From:
Aaron Sherman
Date:
March 30, 2005 10:52
Subject:
Re: Parameter and trait questions - just how 'only' _is_'read-only'?
Message ID:
1112208761.7453.19121.camel@pps
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 <ajs@ajs.com>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback



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