May 23, 2008 is public the default or not? | ||||
---|---|---|---|---|
| ||||
is public the default or not? If so why are all the functions/methods in dwthelper.utils.d marked private . Does that do something that I have missed or are they just superfluous? some are public static |
May 23, 2008 Re: is public the default or not? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tower Ty | Tower Ty wrote:
> is public the default or not?
>
> If so why are all the functions/methods in dwthelper.utils.d marked private . Does that do something that I have missed or are they just superfluous?
>
> some are public static
Public is the default. If members are private it is an error to access them from outside the module. Marking something "public" at the module level (or anywhere else it would be public by default) helps readability.
|
Copyright © 1999-2021 by the D Language Foundation