Re: How to let D's one module contains lots of classes.

2014-11-09 Thread ketmar via Digitalmars-d
On Sun, 09 Nov 2014 16:05:31 + tcak via Digitalmars-d wrote: > On Sunday, 9 November 2014 at 15:54:45 UTC, ketmar via > Digitalmars-d wrote: > > On Sun, 09 Nov 2014 15:40:51 + > > tcak via Digitalmars-d wrote: > > > >> That's good, but there is no need to add a new keyword as > >> "par

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread tcak via Digitalmars-d
On Sunday, 9 November 2014 at 15:54:45 UTC, ketmar via Digitalmars-d wrote: On Sun, 09 Nov 2014 15:40:51 + tcak via Digitalmars-d wrote: That's good, but there is no need to add a new keyword as "partial" for module I think. and even compiler changes are unnecessary. `import()`, it rocks.

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread ketmar via Digitalmars-d
On Sun, 09 Nov 2014 15:40:51 + tcak via Digitalmars-d wrote: > That's good, but there is no need to add a new keyword as > "partial" for module I think. and even compiler changes are unnecessary. `import()`, it rocks. signature.asc Description: PGP signature

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread tcak via Digitalmars-d
On Sunday, 9 November 2014 at 15:40:53 UTC, tcak wrote: On Sunday, 9 November 2014 at 13:17:37 UTC, AlanThinker wrote: That's good, but there is no need to add a new keyword as "partial" for module I think. If compiler would just merge same modules together automatically, that would do it. M

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread tcak via Digitalmars-d
On Sunday, 9 November 2014 at 13:17:37 UTC, AlanThinker wrote: On Sunday, 9 November 2014 at 12:21:28 UTC, tcak wrote: If we can create partial module, it will be easier to use. then no package needed. such as: // test/foo/gui/button.d partial module foo.gui; class Button {

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread AlanThinker via Digitalmars-d
On Sunday, 9 November 2014 at 12:21:28 UTC, tcak wrote: On Sunday, 9 November 2014 at 11:30:22 UTC, AlanThinker wrote: Yes, you are right. Package can do it. Thanks all of you! Yes, package can do it, thou this adds burden to maintain packages this time. Weirdness of this design is seen in d

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread tcak via Digitalmars-d
On Sunday, 9 November 2014 at 11:30:22 UTC, AlanThinker wrote: Yes, you are right. Package can do it. Thanks all of you! Yes, package can do it, thou this adds burden to maintain packages this time. Weirdness of this design is seen in druntime as well. core.sync.mutex.Mutex Doubling mutex

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread AlanThinker via Digitalmars-d
Yes, you are right. Package can do it. Thanks all of you!

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread Mike Parker via Digitalmars-d
On 11/9/2014 7:25 PM, AlanThinker wrote: On Sunday, 9 November 2014 at 10:02:41 UTC, bearophile wrote: AlanThinker: If there all classes in one file, the file will be to big. The file will also probably contain several free functions, and not just classes. Bye, bearophile Is it possible t

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread Joakim via Digitalmars-d
On Sunday, 9 November 2014 at 10:25:36 UTC, AlanThinker wrote: On Sunday, 9 November 2014 at 10:02:41 UTC, bearophile wrote: AlanThinker: If there all classes in one file, the file will be to big. The file will also probably contain several free functions, and not just classes. Bye, bearo

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread AlanThinker via Digitalmars-d
On Sunday, 9 November 2014 at 10:02:41 UTC, bearophile wrote: AlanThinker: If there all classes in one file, the file will be to big. The file will also probably contain several free functions, and not just classes. Bye, bearophile Is it possible to let one module contains lots of classe

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread bearophile via Digitalmars-d
AlanThinker: If there all classes in one file, the file will be to big. The file will also probably contain several free functions, and not just classes. Bye, bearophile

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread Jack via Digitalmars-d
On Sunday, 9 November 2014 at 09:17:19 UTC, AlanThinker wrote: I notice that lots of GUI library will create a module which have the same name as the class to hold a class. such as: /// module tkd.widget.button; class Button /// If one module can have different classes in different files. It ca

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread AlanThinker via Digitalmars-d
I notice that lots of GUI library will create a module which have the same name as the class to hold a class. such as: /// module tkd.widget.button; class Button /// If one module can have different classes in different files. It can change to: /// module tkd.widget; class Button /// If someone

Re: How to let D's one module contains lots of classes.

2014-11-09 Thread Rikki Cattermole via Digitalmars-d
On 9/11/2014 9:44 p.m., AlanThinker wrote: In C#, one namespace can contains lots of classes. How to let D's one module contains lots of classes. It seems that in D one module must in a single file. If there all classes in one file, the file will be to big. You are correct, that one fil

How to let D's one module contains lots of classes.

2014-11-09 Thread AlanThinker via Digitalmars-d
In C#, one namespace can contains lots of classes. How to let D's one module contains lots of classes. It seems that in D one module must in a single file. If there all classes in one file, the file will be to big.