Re: Compiler error with static vars/functions

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 04:38:12PM +0100, Artur Skawina wrote: > On 02/10/12 16:18, Don Clugston wrote: > > On 10/02/12 16:08, Artur Skawina wrote: [...] > >> No, having non-lower case filenames would just lead to problems. > >> Like different modules being imported depending on the filesystem > >>

Re: Compiler error with static vars/functions

2012-02-10 Thread Artur Skawina
On 02/10/12 16:18, Don Clugston wrote: > On 10/02/12 16:08, Artur Skawina wrote: >> On 02/10/12 15:18, Don Clugston wrote: >>> On 09/02/12 23:03, Jonathan M Davis wrote: On Thursday, February 09, 2012 14:45:43 bearophile wrote: > Jonathan M Davis: >> Normally, it's considered good prac

Re: Compiler error with static vars/functions

2012-02-10 Thread Don Clugston
On 10/02/12 16:08, Artur Skawina wrote: On 02/10/12 15:18, Don Clugston wrote: On 09/02/12 23:03, Jonathan M Davis wrote: On Thursday, February 09, 2012 14:45:43 bearophile wrote: Jonathan M Davis: Normally, it's considered good practice to give modules names which are all lowercase (particul

Re: Compiler error with static vars/functions

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 04:08:36PM +0100, Artur Skawina wrote: > On 02/10/12 15:18, Don Clugston wrote: > > On 09/02/12 23:03, Jonathan M Davis wrote: > >> On Thursday, February 09, 2012 14:45:43 bearophile wrote: > >>> Jonathan M Davis: > Normally, it's considered good practice to give module

Re: Compiler error with static vars/functions

2012-02-10 Thread Artur Skawina
On 02/10/12 15:18, Don Clugston wrote: > On 09/02/12 23:03, Jonathan M Davis wrote: >> On Thursday, February 09, 2012 14:45:43 bearophile wrote: >>> Jonathan M Davis: Normally, it's considered good practice to give modules names which are all lowercase (particularly since some OSes aren't

Re: Compiler error with static vars/functions

2012-02-10 Thread Don Clugston
On 09/02/12 23:03, Jonathan M Davis wrote: On Thursday, February 09, 2012 14:45:43 bearophile wrote: Jonathan M Davis: Normally, it's considered good practice to give modules names which are all lowercase (particularly since some OSes aren't case-sensitive for file operations). That's just a

Re: Compiler error with static vars/functions

2012-02-09 Thread Mike Parker
On 2/10/2012 6:42 AM, Oliver Plow wrote: Thanks for the answer. This means that all classes belonging to the same module must be in the same *.d file? I mean not one *.d file per class as in most languages? Regards, Oliver Actually, yes. You can't have two modules of the same name. In D, '

Re: Compiler error with static vars/functions

2012-02-09 Thread Mike Parker
On 2/10/2012 1:00 PM, Mike Parker wrote: On 2/10/2012 6:42 AM, Oliver Plow wrote: Thanks for the answer. This means that all classes belonging to the same module must be in the same *.d file? I mean not one *.d file per class as in most languages? Regards, Oliver Actually, yes. You can't hav

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 22:42:17 Oliver Plow wrote: > Thanks for the answer. This means that all classes belonging to the same > module must be in the same *.d file? I mean not one *.d file per class as > in most languages? There is no connection between modules and classes other than the f

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 14:45:43 bearophile wrote: > Jonathan M Davis: > > Normally, it's considered good practice to give modules names which are > > all lowercase (particularly since some OSes aren't case-sensitive for > > file operations). > > That's just a fragile work-around for a modu

Re: Compiler error with static vars/functions

2012-02-09 Thread Oliver Plow
avis" > An: "digitalmars.D.learn" > Betreff: Re: Compiler error with static vars/functions > On Thursday, February 09, 2012 14:57:08 Oliver Plow wrote: > > Hello, > > > > I'm fighting with a strange compiler error. This here compiles and runs &g

Re: Compiler error with static vars/functions

2012-02-09 Thread bearophile
> I'll take a look in Bugzilla if there is already something on this. Nevermind. Bye, bearophile

Re: Compiler error with static vars/functions

2012-02-09 Thread bearophile
Jonathan M Davis: > Normally, it's considered good practice to give modules names which are all > lowercase (particularly since some OSes aren't case-sensitive for file > operations). That's just a fragile work-around for a module system design problem that I didn't like from the first day I've

Re: Compiler error with static vars/functions

2012-02-09 Thread simendsjo
On 02/09/2012 02:57 PM, Oliver Plow wrote: Hello, I'm fighting with a strange compiler error. This here compiles and runs fine: -- main.d - class Foo { static int z = 4; static int bar() { return 6; } int foobar() { return 7; } } int main(string[] argv) {

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 14:57:08 Oliver Plow wrote: > Hello, > > I'm fighting with a strange compiler error. This here compiles and runs > fine: > [snip] > > This is a bit strange for me. Apparently, must be some kind of import > problem importing Foo. But I don't see how ... It's because