Re: Is it possible to write some class members in another module ?

2020-05-20 Thread welkam via Digitalmars-d-learn
On Wednesday, 20 May 2020 at 17:29:47 UTC, Vinod K Chandran wrote: I am very sad that i delayed to start learning D only because of semicolons and curly braces. Walter(creator of this language) said that redundant grammar is a good thing because it allows compiler to emit better error

Re: Is it possible to write some class members in another module ?

2020-05-20 Thread Vinod K Chandran via Digitalmars-d-learn
On Wednesday, 20 May 2020 at 15:01:36 UTC, welkam wrote: On Wednesday, 20 May 2020 at 09:45:48 UTC, Vinod K Chandran wrote: // Now, we need to use like this auto form= new Window(); form.event.click = bla_bla; // I really want to use like this auto form= new Window(); form.click = bla_bla; ```

Re: Is it possible to write some class members in another module ?

2020-05-20 Thread welkam via Digitalmars-d-learn
On Wednesday, 20 May 2020 at 09:45:48 UTC, Vinod K Chandran wrote: // Now, we need to use like this auto form= new Window(); form.event.click = bla_bla; // I really want to use like this auto form= new Window(); form.click = bla_bla; ``` Then you want alias this. class Window : Control{

Re: Is it possible to write some class members in another module ?

2020-05-20 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 19 May 2020 at 23:51:45 UTC, Boris Carvajal wrote: On Tuesday, 19 May 2020 at 22:01:03 UTC, Vinod K Chandran wrote: Hi all, Is it possible to write some class members in another module ? I have class with a lot of member variables.(probably 50+) I would like to write them (Not

Re: Is it possible to write some class members in another module ?

2020-05-20 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 19 May 2020 at 22:10:25 UTC, Adam D. Ruppe wrote: On Tuesday, 19 May 2020 at 22:01:03 UTC, Vinod K Chandran wrote: Is it possible to write some class members in another module ? You can make some of members be other structs that you aggregate together. That's a good idea but

Re: Is it possible to write some class members in another module ?

2020-05-19 Thread Boris Carvajal via Digitalmars-d-learn
On Tuesday, 19 May 2020 at 22:01:03 UTC, Vinod K Chandran wrote: Hi all, Is it possible to write some class members in another module ? I have class with a lot of member variables.(probably 50+) I would like to write them (Not all, but some of them) in a special module for the sake of

Re: Is it possible to write some class members in another module ?

2020-05-19 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 19 May 2020 at 22:01:03 UTC, Vinod K Chandran wrote: Is it possible to write some class members in another module ? You can make some of members be other structs that you aggregate together.