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

Re: You never have privacy from your children in Perl 6

Thread Previous | Thread Next
From:
Moritz Lenz
Date:
March 23, 2010 12:54
Subject:
Re: You never have privacy from your children in Perl 6
Message ID:
4BA91C50.80200@faui2k3.org
Daniel Ruoso wrote:
> Em Ter, 2010-03-23 às 19:41 +0100, Carl Mäsak escreveu:
>> <masak> um, so 'protected' is when the deriving classes can see the
>> attribute?
>> <jonalv> yup
>> <masak> that's what 'private' means in Perl 6.
>> <jonalv> what? so there's only really 'public' and 'protected', but no
>> 'private'?
>> <masak> basically, yes. although 'protected' in Java is called
>> 'private' in Perl 6.
> 
> Au contraire. In Perl you only have 'protected'

A "protected" attribute is one that can be accessed by subclasses, but
not from the rest of the outside world - where do you have that in Perl
6? It's the first time I hear about that (unless you count 'trusts'
traits, which are specific to single classes, not groups of subclasses).

Afaict Perl 6 only has "private", with "public" emulated by accessors.

Cheers,

Moritz

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