Re: Code-File structure

2012-06-14 Thread Artur Skawina
On 06/14/12 22:03, Pragma Tix wrote: > Am 14.06.2012 20:01, schrieb Artur Skawina: >> On 06/14/12 19:26, Pragma Tix wrote: >>> Am 13.06.2012 03:56, schrieb Nathan M. Swan: You cannot put multiple modules in a file like C++ namespaces. >>> >>> A nice trick in D for creating local namespaces tha

Re: Code-File structure

2012-06-14 Thread Pragma Tix
Am 14.06.2012 20:01, schrieb Artur Skawina: On 06/14/12 19:26, Pragma Tix wrote: Am 13.06.2012 03:56, schrieb Nathan M. Swan: You cannot put multiple modules in a file like C++ namespaces. A nice trick in D for creating local namespaces that combine items from several modules under one name

Re: Code-File structure

2012-06-14 Thread Artur Skawina
On 06/14/12 19:26, Pragma Tix wrote: > Am 13.06.2012 03:56, schrieb Nathan M. Swan: >> You cannot put multiple modules in a file like C++ namespaces. > > A nice trick in D for creating local namespaces that combine items from > several modules under one name is to use a mixin template. > > mixin

Re: Code-File structure

2012-06-14 Thread Pragma Tix
Am 13.06.2012 03:56, schrieb Nathan M. Swan: You cannot put multiple modules in a file like C++ namespaces. A nice trick in D for creating local namespaces that combine items from several modules under one name is to use a mixin template. module app; mixin template StdLib() { import std.

Re: Code-File structure

2012-06-13 Thread Kagamin
On Wednesday, 13 June 2012 at 15:15:11 UTC, Kagamin wrote: On Tuesday, 12 June 2012 at 19:35:47 UTC, Henrik Valter Vogelius Hansson wrote: Nice thanks! That will help me out a lot! Is there a "D" way to do it? Or is D too young to have that yet? The D way is to have all classes in one file.

Re: Code-File structure

2012-06-13 Thread Kagamin
On Tuesday, 12 June 2012 at 19:35:47 UTC, Henrik Valter Vogelius Hansson wrote: Nice thanks! That will help me out a lot! Is there a "D" way to do it? Or is D too young to have that yet? The D way is to have all classes in one file.

Re: Code-File structure

2012-06-12 Thread Nathan M. Swan
On Tuesday, 12 June 2012 at 07:04:15 UTC, Henrik Valter Vogelius Hansson wrote: Hi! I'm new to D and trying everything out. Got the basics down which are very straightforward and similar to other languages. My professional background is primarily in C/C++-variants and Ruby if it helps. I ha

Re: Code-File structure

2012-06-12 Thread Henrik Valter Vogelius Hansson
On Tuesday, 12 June 2012 at 18:07:45 UTC, Francois Chabot wrote: On Tuesday, 12 June 2012 at 07:04:15 UTC, Henrik Valter Vogelius Hansson wrote: Hi! I'm new to D and trying everything out. Got the basics down which are very straightforward and similar to other languages. My professional backg

Re: Code-File structure

2012-06-12 Thread Francois Chabot
On Tuesday, 12 June 2012 at 07:04:15 UTC, Henrik Valter Vogelius Hansson wrote: Hi! I'm new to D and trying everything out. Got the basics down which are very straightforward and similar to other languages. My professional background is primarily in C/C++-variants and Ruby if it helps. I ha