Re: private module stuff

2011-05-08 Thread Jonathan M Davis
> On 5/8/2011 4:05 AM, Jonathan M Davis wrote: > >> Sean Cavanaugh: > >>> So I was learning how to make a module of mine very strict with > >>> private > >>> > >>> parts, and was surprised I could only do this with global variables and > >>> functions. Enums, structs, and classes are fully v

Re: private module stuff

2011-05-08 Thread bearophile
Sean Cavanaugh: > With the language the way it is now, it is nonsensical to have the > attributes public/protected/package/private/export precede the keyword > struct, class, or enum. It's an implementation bug or a design bug. If it's not already in Bugzilla then it deserves to be there. Bye

Re: private module stuff

2011-05-08 Thread Sean Cavanaugh
On 5/8/2011 4:05 AM, Jonathan M Davis wrote: Sean Cavanaugh: So I was learning how to make a module of mine very strict with private parts, and was surprised I could only do this with global variables and functions. Enums, structs, and classes are fully visible outside the module rega

Re: private module stuff

2011-05-08 Thread Jonathan M Davis
> Jonathan M Davis: > > They're private _access_ but still visible. > > In my opinion this is not good, it looks like a messy special case. > > > I believe that it's necessary for stuff like > > where various functions in std.algorithm return auto and return a private > > struct which you cannot

Re: private module stuff

2011-05-08 Thread bearophile
Jonathan M Davis: > They're private _access_ but still visible. In my opinion this is not good, it looks like a messy special case. > I believe that it's necessary for stuff like > where various functions in std.algorithm return auto and return a private > struct which you cannot construct yo

Re: private module stuff

2011-05-08 Thread Jonathan M Davis
> Sean Cavanaugh: > > So I was learning how to make a module of mine very strict with private > > > > parts, and was surprised I could only do this with global variables and > > functions. Enums, structs, and classes are fully visible outside the > > module regardless of being wrapped in a p

Re: private module stuff

2011-05-08 Thread bearophile
Sean Cavanaugh: > So I was learning how to make a module of mine very strict with private > parts, and was surprised I could only do this with global variables and > functions. Enums, structs, and classes are fully visible outside the > module regardless of being wrapped in a private{}

private module stuff

2011-05-08 Thread Sean Cavanaugh
So I was learning how to make a module of mine very strict with private parts, and was surprised I could only do this with global variables and functions. Enums, structs, and classes are fully visible outside the module regardless of being wrapped in a private{} or prefixed with private. Am