On Mar 27, 2010, at 15:43 , Darren Duncan wrote:
For example, say you want to define a graph of some kind, and for
elegance you have a separate container and node and side classes,
On Sat, 27 Mar 2010, Brandon S. Allbery KF8NH wrote:
This sounds like a hackaround for an incomplete
Martin D Kealey wrote:
On Mar 27, 2010, at 15:43 , Darren Duncan wrote:
For example, say you want to define a graph of some kind, and for
elegance you have a separate container and node and side classes,
On Sat, 27 Mar 2010, Brandon S. Allbery KF8NH wrote:
This sounds like a hackaround for
On 03/26/2010 04:16 PM, Jason Switzer wrote:
Also, this discussion of trusts piqued my interest; this sounds like a bad
idea. Those of you who have worked extensively with C++ should bemoan
trusts as much as friend classes. They break encapsulation for special
cases, almost encouraging truly
My own take on 'trusts' is that I consider its main purpose is to let
programmers *avoid* contrivances when they want to define something that would
otherwise be a single class but is split into multiple classes for better
elegance. For example, say you want to define a graph of some kind, and
On Mar 27, 2010, at 15:43 , Darren Duncan wrote:
My own take on 'trusts' is that I consider its main purpose is to
let programmers *avoid* contrivances when they want to define
something that would otherwise be a single class but is split into
multiple classes for better elegance. For
Carl (), Darren ():
I didn't get it to trust me, though:
masak pugs: class A { has $!foo }; class B { trusts A; method bar(A
$a) { say $a!foo } }; B.new.bar(A.new(:bar(42)))
p6eval pugs: OUTPUT«»
Either it bitrotted or I'm using it wrong.
You're using it wrong. You need to put 'trusts
On Fri, Mar 26, 2010 at 7:16 AM, Carl Mäsak cma...@gmail.com wrote:
You're using it wrong. You need to put 'trusts B;' in A in order for B to
see A's privates. I hope it is obvious why this is the case. -- Darren
Duncan
Aye, my mistake. Apparently the syntax I used to try to get at the
Carl (), Moritz (), Carl (), Moritz ():
masak um, so 'protected' is when the deriving classes can see the
attribute?
jonalv yup
masak that's what 'private' means in Perl 6.
That's wrong. Perl 6's private is like Java's private - subclasses
can't see it.
It's just Rakudo being leaky at the
Carl Mäsak wrote:
Carl (), Moritz (), Carl (), Moritz ():
masak um, so 'protected' is when the deriving classes can see the attribute?
jonalv yup
masak that's what 'private' means in Perl 6.
That's wrong. Perl 6's private is like Java's private - subclasses
can't see it.
It's just Rakudo being
Carl (), Darren ():
[...] and the
'trusts' keyword hasn't been realized in any Perl 6 implementation so
far.
I seem to recall that Pugs did support 'trusts' a few years ago, and that I
used it. But I could be wrong. -- Darren Duncan
I stand corrected. A quick search through the Pugs
Carl Mäsak wrote:
Carl (), Darren ():
[...] and the
'trusts' keyword hasn't been realized in any Perl 6 implementation so
far.
I seem to recall that Pugs did support 'trusts' a few years ago, and that I
used it. But I could be wrong. -- Darren Duncan
I stand corrected. A quick search
Carl Mäsak wrote:
masak um, so 'protected' is when the deriving classes can see the attribute?
jonalv yup
masak that's what 'private' means in Perl 6.
That's wrong. Perl 6's private is like Java's private - subclasses
can't see it.
It's just Rakudo being leaky at the moment, not a fallacy of
Carl (), Moritz ():
masak um, so 'protected' is when the deriving classes can see the
attribute?
jonalv yup
masak that's what 'private' means in Perl 6.
That's wrong. Perl 6's private is like Java's private - subclasses
can't see it.
It's just Rakudo being leaky at the moment, not a
Carl Mäsak wrote:
Carl (), Moritz ():
masak um, so 'protected' is when the deriving classes can see the
attribute?
jonalv yup
masak that's what 'private' means in Perl 6.
That's wrong. Perl 6's private is like Java's private - subclasses
can't see it.
It's just Rakudo being leaky at
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.
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'?
Em Ter, 2010-03-23 às 20:53 +0100, Moritz Lenz escreveu:
unless you count 'trusts'
traits, which are specific to single classes, not groups of subclasses
Yes, that was what I meant...
daniel
Am Dienstag, den 23.03.2010, 20:06 +0100 schrieb Moritz Lenz:
Carl Mäsak wrote:
Carl (), Moritz ():
masak um, so 'protected' is when the deriving classes can see the
attribute?
jonalv yup
masak that's what 'private' means in Perl 6.
That's wrong. Perl 6's private is like Java's
18 matches
Mail list logo