Re: We need an internal keyword.

2018-10-22 Thread 12345swordy via Digitalmars-d
On Monday, 22 October 2018 at 11:06:42 UTC, Jonathan M Davis wrote: On Monday, October 22, 2018 2:30:21 AM MDT Basile B. via Digitalmars-d wrote: On Monday, 22 October 2018 at 08:25:17 UTC, Andrea Fontana wrote: > Moreover: you're the author of the module so you're supposed > to know how it

Re: We need an internal keyword.

2018-10-22 Thread Jonathan M Davis via Digitalmars-d
On Monday, October 22, 2018 2:30:21 AM MDT Basile B. via Digitalmars-d wrote: > On Monday, 22 October 2018 at 08:25:17 UTC, Andrea Fontana wrote: > > Moreover: you're the author of the module so you're supposed to > > know how it works and which members you should call or not. > > - team > -

Re: We need an internal keyword.

2018-10-22 Thread Basile B. via Digitalmars-d
On Monday, 22 October 2018 at 08:25:17 UTC, Andrea Fontana wrote: Moreover: you're the author of the module so you're supposed to know how it works and which members you should call or not. - team - maintainer of a module written by someone that works elsewhere now. that's two cases where

Re: We need an internal keyword.

2018-10-22 Thread Andrea Fontana via Digitalmars-d
On Sunday, 21 October 2018 at 03:17:23 UTC, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp.

Re: We need an internal keyword.

2018-10-22 Thread Laurent Tréguier via Digitalmars-d
On Sunday, 21 October 2018 at 23:50:57 UTC, 12345swordy wrote: If the cost out way the benefits then I simply introduce the "strict" keyword to avoid code breakage, or introduce the optional module scoping. -Alex Looking at the dlang.org page about visibility attributes, the `package`

Re: We need an internal keyword.

2018-10-22 Thread Laurent Tréguier via Digitalmars-d
On Sunday, 21 October 2018 at 23:50:57 UTC, 12345swordy wrote: On Sunday, 21 October 2018 at 21:48:22 UTC, Laurent Tréguier wrote: On Sunday, 21 October 2018 at 17:09:05 UTC, 12345swordy wrote: [...] It's not "my" solution. It's D's solution. I perfectly understand why you'd want this and I

Re: We need an internal keyword.

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/20/18 11:17 PM, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp. I've always felt the

Re: We need an internal keyword.

2018-10-21 Thread 12345swordy via Digitalmars-d
On Sunday, 21 October 2018 at 21:48:22 UTC, Laurent Tréguier wrote: On Sunday, 21 October 2018 at 17:09:05 UTC, 12345swordy wrote: [...] It's not "my" solution. It's D's solution. I perfectly understand why you'd want this and I would probably make use of a private/internal difference

Re: We need an internal keyword.

2018-10-21 Thread 12345swordy via Digitalmars-d
On Sunday, 21 October 2018 at 19:53:35 UTC, Jonathan M Davis wrote: On Saturday, October 20, 2018 9:17:23 PM MDT 12345swordy via Digitalmars-d wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module

Re: We need an internal keyword.

2018-10-21 Thread Laurent Tréguier via Digitalmars-d
On Sunday, 21 October 2018 at 17:48:08 UTC, Neia Neutuladh wrote: On Sun, 21 Oct 2018 08:40:36 +, Laurent Tréguier wrote: This is by design; the D way of dealing with this would be to split the module into a package with multiple modules. This is often a usable way of doing things, but

Re: We need an internal keyword.

2018-10-21 Thread Laurent Tréguier via Digitalmars-d
On Sunday, 21 October 2018 at 17:09:05 UTC, 12345swordy wrote: I know what the current design is!! You have zero tools in regarding to allowing class to share certain variables but not others in the same module! Create a module for every class is taking all or nothing approach, when there is a

Re: We need an internal keyword.

2018-10-21 Thread Jonathan M Davis via Digitalmars-d
On Saturday, October 20, 2018 9:17:23 PM MDT 12345swordy via Digitalmars-d wrote: > So that classes can share some of their variables but not others > in a module. > > IE. > > class A > { > internal int A; //This is shared in the module > private int B; // But not this. > } > > No need to

Re: We need an internal keyword.

2018-10-21 Thread Neia Neutuladh via Digitalmars-d
On Sun, 21 Oct 2018 08:40:36 +, Laurent Tréguier wrote: > This is by design; the D way of dealing with this would be to split the > module into a package with multiple modules. This is often a usable way of doing things, but sometimes not so much. If you're writing a script for use with dub

Re: We need an internal keyword.

2018-10-21 Thread 12345swordy via Digitalmars-d
On Sunday, 21 October 2018 at 08:40:36 UTC, Laurent Tréguier wrote: On Sunday, 21 October 2018 at 03:17:23 UTC, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But

Re: We need an internal keyword.

2018-10-21 Thread luckoverthere via Digitalmars-d
On Sunday, 21 October 2018 at 03:17:23 UTC, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp.

Re: We need an internal keyword.

2018-10-21 Thread Basile B. via Digitalmars-d
On Sunday, 21 October 2018 at 03:17:23 UTC, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp.

Re: We need an internal keyword.

2018-10-21 Thread Laurent Tréguier via Digitalmars-d
On Sunday, 21 October 2018 at 03:17:23 UTC, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp.