On 05/10/2010 08:27, Jacob Carlborg wrote:
If you have two classes in one file in Java you can access private
methods from the other class.
Only if one class is nested in the other.
--
Bruno Medeiros - Software Engineer
On Wednesday, October 06, 2010 05:39:24 Steven Schveighoffer wrote:
> You must not have read my prior post.
Well, I believe that I did read your previous post, but I probably read it too
quickly.
> Given this class:
>
> class A
> {
>abstract private void foo();
> }
>
> You can construct a
On Wed, 06 Oct 2010 08:23:35 -0400, Jonathan M Davis
wrote:
On Wednesday 06 October 2010 04:04:24 Steven Schveighoffer wrote:
On Tue, 05 Oct 2010 20:27:58 -0400, Jonathan M Davis
wrote:
> Well, I don't see why it wouldn't be possible for the compiler to
> enforce that
> overridden privat
On Wednesday 06 October 2010 04:04:24 Steven Schveighoffer wrote:
> On Tue, 05 Oct 2010 20:27:58 -0400, Jonathan M Davis
>
> wrote:
> > Well, I don't see why it wouldn't be possible for the compiler to
> > enforce that
> > overridden private methods can't be called by anyone but the base class.
>
On Tue, 05 Oct 2010 20:27:58 -0400, Jonathan M Davis
wrote:
Well, I don't see why it wouldn't be possible for the compiler to
enforce that
overridden private methods can't be called by anyone but the base class.
That
being the case, then allowing for private virtual functions is most
def
On Tuesday 05 October 2010 09:42:14 Steven Schveighoffer wrote:
> And when would a protected hook be callable from an unknown/uncontrolled
> context? In whose eyes, the base or derived class?
>
> The thing is, any class that defines a private function implementation is
> able to call it. You can
On Tue, 05 Oct 2010 12:07:21 -0400, Andrei Alexandrescu
wrote:
On 10/5/10 7:40 CDT, Steven Schveighoffer wrote:
On Tue, 05 Oct 2010 03:25:03 -0400, Jacob Carlborg wrote:
Who says we need to implement it as g++ does? DMD could implement it
to not allow that.
The derived class controls e
On 10/5/10 7:40 CDT, Steven Schveighoffer wrote:
On Tue, 05 Oct 2010 03:25:03 -0400, Jacob Carlborg wrote:
Who says we need to implement it as g++ does? DMD could implement it
to not allow that.
The derived class controls everything. You cannot take control away from
the derived class, it j
On Tue, 05 Oct 2010 03:25:03 -0400, Jacob Carlborg wrote:
Who says we need to implement it as g++ does? DMD could implement it to
not allow that.
The derived class controls everything. You cannot take control away from
the derived class, it just can't be done:
class A
{
private voi
On 2010-10-04 21:37, bearophile wrote:
Andrei:
I agree. Class A can access private methods of class B as long as both
defined in the same module. If it has access to private methods, why
can't it override them? Makes little sense, if you ask me, especially
given that user may prevent overriding
On 2010-10-05 00:11, Steven Schveighoffer wrote:
On Mon, 04 Oct 2010 17:54:54 -0400, Jonathan M Davis
wrote:
On Monday, October 04, 2010 13:41:38 Steven Schveighoffer wrote:
To me, making it private doesn't do anything over protected. A derived
class can still call the function in question, b
On Mon, 04 Oct 2010 14:28:32 +0200, Don wrote:
may lose interest in the language because of it alone. (The others
are
bug 3516 and 2451).
Eh, I was bitten but 2451 yesterday and actually had to change a lot
of function signatures and rethink my code to avoid it. I hope is
fixed soon.
On
On Mon, 04 Oct 2010 17:54:54 -0400, Jonathan M Davis
wrote:
On Monday, October 04, 2010 13:41:38 Steven Schveighoffer wrote:
To me, making it private doesn't do anything over protected. A derived
class can still call the function in question, because it has the
implementation. I don't see
On Monday, October 04, 2010 13:41:38 Steven Schveighoffer wrote:
> To me, making it private doesn't do anything over protected. A derived
> class can still call the function in question, because it has the
> implementation. I don't see what the point is...
>
> A derived class from the derivative
On Mon, 04 Oct 2010 16:14:44 -0400, Jonathan M Davis
wrote:
On Monday 04 October 2010 11:26:17 Steven Schveighoffer wrote:
What possible use case could private methods being polymorphic allow?
A private method can only be called by the class that contains the
implementation. Allowing base
On Monday 04 October 2010 11:26:17 Steven Schveighoffer wrote:
> What possible use case could private methods being polymorphic allow?
>
> A private method can only be called by the class that contains the
> implementation. Allowing base classes to call it makes no sense.
>
> Make the method pro
On Mon, 04 Oct 2010 15:14:09 -0400, Andrei Alexandrescu
wrote:
On 10/4/10 13:27 CDT, Denis Koroskin wrote:
And the "package" also implying final is just ridiculous!
This I agree with.
I agree. Class A can access private methods of class B as long as both
defined in the same module. If
Andrei:
> > I agree. Class A can access private methods of class B as long as both
> > defined in the same module. If it has access to private methods, why
> > can't it override them? Makes little sense, if you ask me, especially
> > given that user may prevent overriding methods using "final" key
On 10/4/10 13:27 CDT, Denis Koroskin wrote:
On Mon, 04 Oct 2010 22:13:52 +0400, Jonathan M Davis
wrote:
On Monday, October 04, 2010 10:37:53 Sean Kelly wrote:
Andrei Alexandrescu Wrote:
> There is still debate on the matter of private methods in interfaces.
> Please bring up in this forum any
On Mon, 04 Oct 2010 22:13:52 +0400, Jonathan M Davis
wrote:
On Monday, October 04, 2010 10:37:53 Sean Kelly wrote:
Andrei Alexandrescu Wrote:
> There is still debate on the matter of private methods in interfaces.
> Please bring up in this forum any additional pro and con arguments
that
>
On Mon, 04 Oct 2010 14:29:38 -0400, Denis Koroskin <2kor...@gmail.com>
wrote:
On Mon, 04 Oct 2010 22:26:17 +0400, Steven Schveighoffer
wrote:
What possible use case could private methods being polymorphic allow?
A private method can only be called by the class that contains the
implem
On Mon, 04 Oct 2010 22:26:17 +0400, Steven Schveighoffer
wrote:
On Mon, 04 Oct 2010 14:13:52 -0400, Jonathan M Davis
wrote:
On Monday, October 04, 2010 10:37:53 Sean Kelly wrote:
Andrei Alexandrescu Wrote:
> There is still debate on the matter of private methods in interfaces.
> Please
On Mon, 04 Oct 2010 22:13:52 +0400, Jonathan M Davis
wrote:
On Monday, October 04, 2010 10:37:53 Sean Kelly wrote:
Andrei Alexandrescu Wrote:
> There is still debate on the matter of private methods in interfaces.
> Please bring up in this forum any additional pro and con arguments
that
>
On Mon, 04 Oct 2010 14:13:52 -0400, Jonathan M Davis
wrote:
On Monday, October 04, 2010 10:37:53 Sean Kelly wrote:
Andrei Alexandrescu Wrote:
> There is still debate on the matter of private methods in interfaces.
> Please bring up in this forum any additional pro and con arguments
that
>
On Monday, October 04, 2010 10:37:53 Sean Kelly wrote:
> Andrei Alexandrescu Wrote:
> > There is still debate on the matter of private methods in interfaces.
> > Please bring up in this forum any additional pro and con arguments that
> > you might have.
>
> What debate? Private methods don't get
Andrei Alexandrescu Wrote:
>
> There is still debate on the matter of private methods in interfaces.
> Please bring up in this forum any additional pro and con arguments that
> you might have.
What debate? Private methods don't get a vtbl entry so I don't see how an
interface could possibly r
On 10/4/10 10:47 CDT, Jonathan M Davis wrote:
On Monday 04 October 2010 04:41:53 Sergey wrote:
Hi bearophile,
you've just cheered me up :-) I'll proceed doing my best to get closer to
this language.
By the way, if it's not difficult for you, could you please clarify the
following:
1) what did
On Monday 04 October 2010 04:41:53 Sergey wrote:
> Hi bearophile,
>
> you've just cheered me up :-) I'll proceed doing my best to get closer to
> this language.
> By the way, if it's not difficult for you, could you please clarify the
> following:
>
> 1) what did you mean by "far worse bugs" :-)
Hi Daniel,
I didn't by no means want to say that D is unusable or unenjoyable because
of this still-persisting defect. I would say, D2 is too young to be good
rather than bad. Just.. I considered D to be more mature than it currently
is. Well, at any rate we need to wait some time.
You sa
On Sun, 03 Oct 2010 04:50:26 -0400, Sergey wrote:
Hi, I'm a newcomer to D. Several days ago I've stumbled upon a very
strange thing about D. As I understand, module members, such as classes,
structs, functions and variables can be marked with an accessibility
attribute, such as private,
On Mon, Oct 4, 2010 at 1:24 PM, Sergey wrote:
> Hi Daniel,
>
> I didn't by no means want to say that D is unusable or unenjoyable because
> of this still-persisting defect. I would say, D2 is too young to be good
> rather than bad. Just.. I considered D to be more mature than it currently
> is. We
Daniel Gibson wrote:
2010/10/4 Sergey :
bearophile, thanks you very much for your answer. I've heard that D has a
very vibrant community; now I know it really :)
By now, from what I know about D I can draw a conclusion that it's a greatly
promising language with many innovations and I would say
On Mon, 04 Oct 2010 08:05:49 -0400, Steven Schveighoffer
wrote:
This has been reported several times, it looks to me like it should be
fixed.
What I meant was, someone should fix it, not that it's already fixed :)
-Steve
Hi bearophile,
you've just cheered me up :-) I'll proceed doing my best to get closer to
this language.
By the way, if it's not difficult for you, could you please clarify the
following:
1) what did you mean by "far worse bugs" :-) just several examples
2) Andrei Alexandrescu wrote in his b
Sergey:
> But such serious bugs that are not fixed yet can disgust any programmer, I
> think.
That's a mild bug :-) You can live with it, until it's fixed. There are far
worse bugs in DMD now. You can't ask the implementation of a new language to be
bug-free. Especially a language that has gro
2010/10/4 Sergey :
> bearophile, thanks you very much for your answer. I've heard that D has a
> very vibrant community; now I know it really :)
>
> By now, from what I know about D I can draw a conclusion that it's a greatly
> promising language with many innovations and I would say even fantastic
bearophile, thanks you very much for your answer. I've heard that D has a
very vibrant community; now I know it really :)
By now, from what I know about D I can draw a conclusion that it's a
greatly promising language with many innovations and I would say even
fantastic features and tools (
Sergey:
> With a great surprise, I have discovered that from another module it is
> still possible to access both x1 and C1, though fnc1() is inaccessible !
> Can anyone explain me what does it mean ?
If what you have written is true, and it's easy to test it, then it just means
there's anothe
Hi, I'm a newcomer to D. Several days ago I've stumbled upon a very
strange thing about D. As I understand, module members, such as classes,
structs, functions and variables can be marked with an accessibility
attribute, such as private, public, package or export. Say, there's a
module na
39 matches
Mail list logo