On 02/14/2011 05:13 PM, Steven Schveighoffer wrote:
The theory for the private access in a module goes that likely the same author
wrote all the code in that module, so he should understand what the code is
supposed to do and have free access to anything. It seems to work pretty well
in practice
On 2/14/11, Steven Schveighoffer wrote:
> In C++ a friend function is able to access all private
> data. The most common use of friend functions is for output stream
> processors (since the operator is on the stream and not the object being
> outputted).
Oh right, these << << <
On Mon, 14 Feb 2011 10:52:41 -0500, Andrej Mitrovic
wrote:
On 2/14/11, Steven Schveighoffer wrote:
What's wrong with:
class Foo {
private int _x, _y;
this(int x, int y) {
_x = x;
_y = y;
}
int sumXY() {
return _x + _y;
}
}
Nothing! But
On 2/14/11, Steven Schveighoffer wrote:
> What's wrong with:
>
> class Foo {
> private int _x, _y;
> this(int x, int y) {
> _x = x;
> _y = y;
> }
> int sumXY() {
> return _x + _y;
> }
> }
Nothing! But the OP asked why it's possible to access the
On Fri, 11 Feb 2011 17:26:29 -0500, Andrej Mitrovic
wrote:
On 2/11/11, bearophile wrote:
Steven Schveighoffer:
Any code can access any members defined in the current module,
regardless
of access attributes
I am not sure if Walter understands how much this rule makes it hard for
peopl
On 02/11/2011 11:26 PM, Andrej Mitrovic wrote:
On 2/11/11, bearophile wrote:
Steven Schveighoffer:
Any code can access any members defined in the current module, regardless
of access attributes
I am not sure if Walter understands how much this rule makes it hard for
people not already used
== Auszug aus Andrej Mitrovic (andrej.mitrov...@gmail.com)'s Artikel
> On 2/11/11, bearophile wrote:
> > Steven Schveighoffer:
> >
> >> Any code can access any members defined in the current module,
regardless
> >>
> >> of access attributes
> >
> > I am not sure if Walter understands how much this
On 2/11/11, bearophile wrote:
> Steven Schveighoffer:
>
>> Any code can access any members defined in the current module, regardless
>>
>> of access attributes
>
> I am not sure if Walter understands how much this rule makes it hard for
> people not already used to protected/private attributes to
== Auszug aus bearophile (bearophileh...@lycos.com)'s Artikel
> Steven Schveighoffer:
> > Any code can access any members defined in the current module,
regardless
> > of access attributes
> I am not sure if Walter understands how much this rule makes it
hard for people not already used to protecte
== Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel
> On Fri, 11 Feb 2011 16:14:31 -0500, %u wrote:
> > == Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel
> >
> > Thanks, but what about the following:
> >
> > import std.stdio : writeln;
> >
> > class a {
> >
> >
Steven Schveighoffer:
> Any code can access any members defined in the current module, regardless
> of access attributes
I am not sure if Walter understands how much this rule makes it hard for people
not already used to protected/private attributes to understand and learn to use
those attrib
On Fri, 11 Feb 2011 16:14:31 -0500, %u wrote:
== Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel
Thanks, but what about the following:
import std.stdio : writeln;
class a {
public this(int v) {
myVar = v;
}
protected int myVar;
}
== Auszug aus Steven Schveighoffer (schvei...@yahoo.com)'s Artikel
> On Fri, 11 Feb 2011 15:40:18 -0500, %u wrote:
> > Hello,
> >
> > I've a problem with my class inheritance. I have class called
Texture
> > which implements the interface IDrawable and the abstract class
> > APickable.
> > The Tex
On Fri, 11 Feb 2011 15:40:18 -0500, %u wrote:
Hello,
I've a problem with my class inheritance. I have class called Texture
which implements the interface IDrawable and the abstract class
APickable.
The Texture-class contains 3 members which looks like this:
GLuint pTextureID;
Size pSize1, pS
Hello,
I've a problem with my class inheritance. I have class called Texture
which implements the interface IDrawable and the abstract class
APickable.
The Texture-class contains 3 members which looks like this:
GLuint pTextureID;
Size pSize1, pSize2;
Finally... my Texture-class looks like:
cl
15 matches
Mail list logo