Re: Does the 'package' protection attribute not work?

2011-08-08 Thread Michel Fortin
On 2011-08-08 13:55:32 +, Andrei Alexandrescu said: On 8/8/11 1:56 AM, Jacob Carlborg wrote: On 2011-08-08 00:29, Robert Clipsham wrote: On 07/08/2011 22:18, Jonathan M Davis wrote: Personally, I don't see much point in using the package specifier when you're not actually using a packag

Re: Does the 'package' protection attribute not work?

2011-08-08 Thread Jacob Carlborg
On 2011-08-08 15:55, Andrei Alexandrescu wrote: On 8/8/11 1:56 AM, Jacob Carlborg wrote: On 2011-08-08 00:29, Robert Clipsham wrote: On 07/08/2011 22:18, Jonathan M Davis wrote: Personally, I don't see much point in using the package specifier when you're not actually using a package hierarchy

Re: Does the 'package' protection attribute not work?

2011-08-08 Thread Andrei Alexandrescu
On 8/8/11 1:56 AM, Jacob Carlborg wrote: On 2011-08-08 00:29, Robert Clipsham wrote: On 07/08/2011 22:18, Jonathan M Davis wrote: Personally, I don't see much point in using the package specifier when you're not actually using a package hierarchy (you're just making it so that everything but st

Re: Does the 'package' protection attribute not work?

2011-08-08 Thread Jacob Carlborg
On 2011-08-08 09:11, Jonathan M Davis wrote: On Monday 08 August 2011 08:55:22 Jacob Carlborg wrote: Or because neither of the modules are in package they are perhaps in an implicit global package making "package" in this case behave as public. Except that I don't think that sub-packages have

Re: Does the 'package' protection attribute not work?

2011-08-08 Thread Robert Clipsham
On 08/08/2011 02:10, Jonathan M Davis wrote: Ah. Then package is horribly broken at the moment. Lovely. I guess that that just goes to show that it's not used heavily or there would be a lot more complaints about it. Another possibility is it's not used because it doesn't work - that's my curr

Re: Does the 'package' protection attribute not work?

2011-08-08 Thread Jonathan M Davis
On Monday 08 August 2011 08:55:22 Jacob Carlborg wrote: > On 2011-08-07 23:18, Jonathan M Davis wrote: > > On Sunday 07 August 2011 18:58:53 Stijn Herreman wrote: > >> module main; > >> > >> import std.stdio; > >> import my_module; > >> > >> int main() > >> { > >> > >>my_method(); > >>re

Re: Does the 'package' protection attribute not work?

2011-08-08 Thread Jacob Carlborg
On 2011-08-08 00:29, Robert Clipsham wrote: On 07/08/2011 22:18, Jonathan M Davis wrote: Personally, I don't see much point in using the package specifier when you're not actually using a package hierarchy (you're just making it so that everything but stuff which actually uses a hierarchy can us

Re: Does the 'package' protection attribute not work?

2011-08-08 Thread Jacob Carlborg
On 2011-08-07 23:18, Jonathan M Davis wrote: On Sunday 07 August 2011 18:58:53 Stijn Herreman wrote: module main; import std.stdio; import my_module; int main() { my_method(); return 0; } module my_module; import std.stdio; package void my_method() { writeln("Hello

Re: Does the 'package' protection attribute not work?

2011-08-07 Thread Jonathan M Davis
On Sunday 07 August 2011 23:29:26 Robert Clipsham wrote: > On 07/08/2011 22:18, Jonathan M Davis wrote: > > Personally, I don't see much point in using the package specifier when > > you're not actually using a package hierarchy (you're just making it so > > that everything but stuff which actually

Re: Does the 'package' protection attribute not work?

2011-08-07 Thread Jonathan M Davis
On Monday 08 August 2011 00:19:56 Stijn Herreman wrote: > On 7/08/2011 23:18, Jonathan M Davis wrote: > > On Sunday 07 August 2011 18:58:53 Stijn Herreman wrote: > >> module main; > >> > >> import std.stdio; > >> import my_module; > >> > >> int main() > >> { > >> > >>my_method(); > >>ret

Re: Does the 'package' protection attribute not work?

2011-08-07 Thread Robert Clipsham
On 07/08/2011 22:18, Jonathan M Davis wrote: Personally, I don't see much point in using the package specifier when you're not actually using a package hierarchy (you're just making it so that everything but stuff which actually uses a hierarchy can use the function - it would be a really weird d

Re: Does the 'package' protection attribute not work?

2011-08-07 Thread Stijn Herreman
On 7/08/2011 23:18, Jonathan M Davis wrote: On Sunday 07 August 2011 18:58:53 Stijn Herreman wrote: module main; import std.stdio; import my_module; int main() { my_method(); return 0; } module my_module; import std.stdio; package void my_method() { writeln("Hello

Re: Does the 'package' protection attribute not work?

2011-08-07 Thread Jonathan M Davis
On Sunday 07 August 2011 18:58:53 Stijn Herreman wrote: > module main; > > import std.stdio; > import my_module; > > int main() > { > my_method(); > return 0; > } > > > module my_module; > > import std.stdio; > > package void my_method() > { >writeln("Hello D-World!"); > }

Does the 'package' protection attribute not work?

2011-08-07 Thread Stijn Herreman
module main; import std.stdio; import my_module; int main() { my_method(); return 0; } module my_module; import std.stdio; package void my_method() { writeln("Hello D-World!"); } Error: function my_module.my_method is not accessible from main