digitalmars.D - Protected package?
- 12345swordy (9/9) Oct 24 2018 It says here that:
- 12345swordy (2/11) Oct 25 2018 Well I don't think there no harm of doing so.
- Steven Schveighoffer (6/18) Oct 25 2018 Sorry, I'm not sure what the question is.
- 12345swordy (4/24) Oct 25 2018 The package visibility attribute. It is an extension of private,
- Steven Schveighoffer (8/33) Oct 25 2018 I think what you are asking is for a "package protected" attribute that
It says here that: "package extends private so that package members can be accessed from code in other modules that are in the same package. If no identifier is provided, this applies to the innermost package only, or defaults to private if a module is not nested in a package." Can this be extended to the protected visibility attribute? If not, then does it need an DIP to do so? -Alex
Oct 24 2018
On Wednesday, 24 October 2018 at 23:36:56 UTC, 12345swordy wrote:It says here that: "package extends private so that package members can be accessed from code in other modules that are in the same package. If no identifier is provided, this applies to the innermost package only, or defaults to private if a module is not nested in a package." Can this be extended to the protected visibility attribute? If not, then does it need an DIP to do so? -AlexWell I don't think there no harm of doing so.
Oct 25 2018
On 10/25/18 12:45 PM, 12345swordy wrote:On Wednesday, 24 October 2018 at 23:36:56 UTC, 12345swordy wrote:Sorry, I'm not sure what the question is. What is "this" and how is it being extended to protected? FYI, I didn't know that you could package something to a specific identifier, interesting. -SteveIt says here that: "package extends private so that package members can be accessed from code in other modules that are in the same package. If no identifier is provided, this applies to the innermost package only, or defaults to private if a module is not nested in a package." Can this be extended to the protected visibility attribute? If not, then does it need an DIP to do so?Well I don't think there no harm of doing so.
Oct 25 2018
On Thursday, 25 October 2018 at 19:48:43 UTC, Steven Schveighoffer wrote:On 10/25/18 12:45 PM, 12345swordy wrote:The package visibility attribute. It is an extension of private, which means that it is not inheritable.On Wednesday, 24 October 2018 at 23:36:56 UTC, 12345swordy wrote:Sorry, I'm not sure what the question is. What is "this" and how is it being extended to protected? FYI, I didn't know that you could package something to a specific identifier, interesting. -SteveIt says here that: "package extends private so that package members can be accessed from code in other modules that are in the same package. If no identifier is provided, this applies to the innermost package only, or defaults to private if a module is not nested in a package." Can this be extended to the protected visibility attribute? If not, then does it need an DIP to do so?Well I don't think there no harm of doing so.
Oct 25 2018
On 10/25/18 3:53 PM, 12345swordy wrote:On Thursday, 25 October 2018 at 19:48:43 UTC, Steven Schveighoffer wrote:I think what you are asking is for a "package protected" attribute that acts like protected, but ONLY for modules inside the given package, right? You would need new syntax for this, for sure. So I think a DIP might be required. There is a problem with having package protected be something different, because right now a visibility attribute overrides, not adds to, an existing attribute. -SteveOn 10/25/18 12:45 PM, 12345swordy wrote:The package visibility attribute. It is an extension of private, which means that it is not inheritable.On Wednesday, 24 October 2018 at 23:36:56 UTC, 12345swordy wrote:Sorry, I'm not sure what the question is. What is "this" and how is it being extended to protected? FYI, I didn't know that you could package something to a specific identifier, interesting.It says here that: "package extends private so that package members can be accessed from code in other modules that are in the same package. If no identifier is provided, this applies to the innermost package only, or defaults to private if a module is not nested in a package." Can this be extended to the protected visibility attribute? If not, then does it need an DIP to do so?Well I don't think there no harm of doing so.
Oct 25 2018