November 14, 2005 Re: Lack of privacy? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jari-Matti Mäkelä | On Mon, 14 Nov 2005 02:09:23 +0200, Jari-Matti Mäkelä <jmjmak@invalid_utu.fi> wrote: > Regan Heath wrote: >>>> The private function actually collides with a public one, this is due to private not hiding the symbol, just preventing access. >>> >>> >>> It should hide the private symbol, when another symbol with public visibility is accessible/visible. >> Yet, however as we agree below it cannot 'forget' about the symbol as it does in C. >> > > No, of course not. We need some 'intelligent' compiler logic here. Agreed. > I just don't want it to be default behavior to explicitly call foomodule.fooclass every time I need some 'external' classes. You can use 'alias' to aleviate some of the problem, eg. import a; import b; alias a.foo foo; foo(); //calls a.foo; Regan |
Copyright © 1999-2021 by the D Language Foundation